diff --git a/python_ta/debug/snapshot_manager.py b/python_ta/debug/snapshot_manager.py index c89385554..c4ee13c60 100644 --- a/python_ta/debug/snapshot_manager.py +++ b/python_ta/debug/snapshot_manager.py @@ -1,8 +1,7 @@ +from __future__ import annotations + import inspect -import json import os -import shutil -import subprocess import sys import types from typing import Any, List, Optional @@ -33,14 +32,15 @@ def __init__( def _trace_func(self, frame: types.FrameType, event: str, _arg: Any) -> None: if event == "line" and frame.f_locals: + memory_viz_args_copy = self.memory_viz_args.copy() if self.output_filepath: - self.memory_viz_args.extend( + memory_viz_args_copy.extend( [ "--output", os.path.join(self.output_filepath, f"snapshot-{self.snapshot_counts}.svg"), ] ) - snapshot(include=self.include, save=True, memory_viz_args=self.memory_viz_args) + snapshot(include=self.include, save=True, memory_viz_args=memory_viz_args_copy) self.snapshot_counts += 1 def get_snapshot_count(self): diff --git a/tests/test_debug/snapshot_manager_testing_snapshots/func_for_loop/snapshot-0.svg b/tests/test_debug/snapshot_manager_testing_snapshots/func_for_loop/snapshot-0.svg index b41de02a1..72ebf3669 100644 --- a/tests/test_debug/snapshot_manager_testing_snapshots/func_for_loop/snapshot-0.svg +++ b/tests/test_debug/snapshot_manager_testing_snapshots/func_for_loop/snapshot-0.svg @@ -1,4 +1,4 @@ -output_pathid1managerid2func_for_loop"/tmp/test_results/func_for_loop"id1str"--roughjs-config"id4str"seed=12345"id5strid4id5id3list"func_for_loop"id7strid7id6tupleoutput_filepathid1memory_viz_argsid3includeid6id2SnapshotManager diff --git a/tests/test_debug/snapshot_manager_testing_snapshots/func_for_loop/snapshot-1.svg b/tests/test_debug/snapshot_manager_testing_snapshots/func_for_loop/snapshot-1.svg index a7899ffef..aa10a5fff 100644 --- a/tests/test_debug/snapshot_manager_testing_snapshots/func_for_loop/snapshot-1.svg +++ b/tests/test_debug/snapshot_manager_testing_snapshots/func_for_loop/snapshot-1.svg @@ -1,4 +1,4 @@ -output_pathid1managerid2numsid9func_for_loop"/tmp/test_results/func_for_loop"id1str"--roughjs-config"id4str"seed=12345"id5strid4id5id3list"func_for_loop"id7strid7id6tuple1id8intoutput_filepathid1memory_viz_argsid3includeid6snapshot_countsid8id2SnapshotManager2id10int3id11intid8id10id11id9list diff --git a/tests/test_debug/snapshot_manager_testing_snapshots/func_for_loop/snapshot-2.svg b/tests/test_debug/snapshot_manager_testing_snapshots/func_for_loop/snapshot-2.svg index deff5fa1f..5fc9ab243 100644 --- a/tests/test_debug/snapshot_manager_testing_snapshots/func_for_loop/snapshot-2.svg +++ b/tests/test_debug/snapshot_manager_testing_snapshots/func_for_loop/snapshot-2.svg @@ -1,4 +1,4 @@ -output_pathid1managerid2numsid9iid12func_for_loop"/tmp/test_results/func_for_loop"id1str"--roughjs-config"id4str"seed=12345"id5strid4id5id3list"func_for_loop"id7strid7id6tuple2id8intoutput_filepathid1memory_viz_argsid3includeid6snapshot_countsid8id2SnapshotManager1id10int3id11intid10id8id11id9list0id12int diff --git a/tests/test_debug/snapshot_manager_testing_snapshots/func_for_loop/snapshot-3.svg b/tests/test_debug/snapshot_manager_testing_snapshots/func_for_loop/snapshot-3.svg index b54bdb8c4..76f0129eb 100644 --- a/tests/test_debug/snapshot_manager_testing_snapshots/func_for_loop/snapshot-3.svg +++ b/tests/test_debug/snapshot_manager_testing_snapshots/func_for_loop/snapshot-3.svg @@ -1,4 +1,4 @@ -output_pathid1managerid2numsid9iid11func_for_loop"/tmp/test_results/func_for_loop"id1str"--roughjs-config"id4str"seed=12345"id5strid4id5id3list"func_for_loop"id7strid7id6tuple3id8intoutput_filepathid1memory_viz_argsid3includeid6snapshot_countsid8id2SnapshotManager2id10intid10id10id8id9list0id11int diff --git a/tests/test_debug/snapshot_manager_testing_snapshots/func_for_loop/snapshot-4.svg b/tests/test_debug/snapshot_manager_testing_snapshots/func_for_loop/snapshot-4.svg index 8849d5957..2882a50ee 100644 --- a/tests/test_debug/snapshot_manager_testing_snapshots/func_for_loop/snapshot-4.svg +++ b/tests/test_debug/snapshot_manager_testing_snapshots/func_for_loop/snapshot-4.svg @@ -1,4 +1,4 @@ -output_pathid1managerid2numsid9iid12func_for_loop"/tmp/test_results/func_for_loop"id1str"--roughjs-config"id4str"seed=12345"id5strid4id5id3list"func_for_loop"id7strid7id6tuple4id8intoutput_filepathid1memory_viz_argsid3includeid6snapshot_countsid8id2SnapshotManager2id10int3id11intid10id10id11id9list1id12int diff --git a/tests/test_debug/snapshot_manager_testing_snapshots/func_for_loop/snapshot-5.svg b/tests/test_debug/snapshot_manager_testing_snapshots/func_for_loop/snapshot-5.svg index b7cb56949..d390f299c 100644 --- a/tests/test_debug/snapshot_manager_testing_snapshots/func_for_loop/snapshot-5.svg +++ b/tests/test_debug/snapshot_manager_testing_snapshots/func_for_loop/snapshot-5.svg @@ -1,4 +1,4 @@ -output_pathid1managerid2numsid9iid12func_for_loop"/tmp/test_results/func_for_loop"id1str"--roughjs-config"id4str"seed=12345"id5strid4id5id3list"func_for_loop"id7strid7id6tuple5id8intoutput_filepathid1memory_viz_argsid3includeid6snapshot_countsid8id2SnapshotManager2id10int3id11intid10id11id11id9list1id12int diff --git a/tests/test_debug/snapshot_manager_testing_snapshots/func_for_loop/snapshot-6.svg b/tests/test_debug/snapshot_manager_testing_snapshots/func_for_loop/snapshot-6.svg index ecb2a8ea5..6043a87af 100644 --- a/tests/test_debug/snapshot_manager_testing_snapshots/func_for_loop/snapshot-6.svg +++ b/tests/test_debug/snapshot_manager_testing_snapshots/func_for_loop/snapshot-6.svg @@ -1,4 +1,4 @@ -output_pathid1managerid2numsid9iid10func_for_loop"/tmp/test_results/func_for_loop"id1str"--roughjs-config"id4str"seed=12345"id5strid4id5id3list"func_for_loop"id7strid7id6tuple6id8intoutput_filepathid1memory_viz_argsid3includeid6snapshot_countsid8id2SnapshotManager2id10int3id11intid10id11id11id9list diff --git a/tests/test_debug/snapshot_manager_testing_snapshots/func_for_loop/snapshot-7.svg b/tests/test_debug/snapshot_manager_testing_snapshots/func_for_loop/snapshot-7.svg index 2c102c73a..04e5920f4 100644 --- a/tests/test_debug/snapshot_manager_testing_snapshots/func_for_loop/snapshot-7.svg +++ b/tests/test_debug/snapshot_manager_testing_snapshots/func_for_loop/snapshot-7.svg @@ -1,4 +1,4 @@ -output_pathid1managerid2numsid9iid10func_for_loop"/tmp/test_results/func_for_loop"id1str"--roughjs-config"id4str"seed=12345"id5strid4id5id3list"func_for_loop"id7strid7id6tuple7id8intoutput_filepathid1memory_viz_argsid3includeid6snapshot_countsid8id2SnapshotManager2id10int3id11int4id12intid10id11id12id9list diff --git a/tests/test_debug/snapshot_manager_testing_snapshots/func_for_loop/snapshot-8.svg b/tests/test_debug/snapshot_manager_testing_snapshots/func_for_loop/snapshot-8.svg index 6ff45697c..b5105950a 100644 --- a/tests/test_debug/snapshot_manager_testing_snapshots/func_for_loop/snapshot-8.svg +++ b/tests/test_debug/snapshot_manager_testing_snapshots/func_for_loop/snapshot-8.svg @@ -1,4 +1,4 @@ -output_pathid1managerid2numsid9iid10func_for_loop"/tmp/test_results/func_for_loop"id1str"--roughjs-config"id4str"seed=12345"id5strid4id5id3list"func_for_loop"id7strid7id6tuple8id8intoutput_filepathid1memory_viz_argsid3includeid6snapshot_countsid8id2SnapshotManager2id10int3id11int4id12intid10id11id12id9list diff --git a/tests/test_debug/snapshot_manager_testing_snapshots/func_multi_line/snapshot-0.svg b/tests/test_debug/snapshot_manager_testing_snapshots/func_multi_line/snapshot-0.svg index 52e0ffb46..b0573526e 100644 --- a/tests/test_debug/snapshot_manager_testing_snapshots/func_multi_line/snapshot-0.svg +++ b/tests/test_debug/snapshot_manager_testing_snapshots/func_multi_line/snapshot-0.svg @@ -1,4 +1,4 @@ -output_pathid1managerid2func_multi_line"/tmp/test_results/func_multi_line"id1str"--roughjs-config"id4str"seed=12345"id5strid4id5id3list"func_multi_line"id7strid7id6tupleoutput_filepathid1memory_viz_argsid3includeid6id2SnapshotManager diff --git a/tests/test_debug/snapshot_manager_testing_snapshots/func_multi_line/snapshot-1.svg b/tests/test_debug/snapshot_manager_testing_snapshots/func_multi_line/snapshot-1.svg index 55983ac83..5c4345469 100644 --- a/tests/test_debug/snapshot_manager_testing_snapshots/func_multi_line/snapshot-1.svg +++ b/tests/test_debug/snapshot_manager_testing_snapshots/func_multi_line/snapshot-1.svg @@ -1,4 +1,4 @@ -output_pathid1managerid2numid9func_multi_line"/tmp/test_results/func_multi_line"id1str"--roughjs-config"id4str"seed=12345"id5strid4id5id3list"func_multi_line"id7strid7id6tuple1id8intoutput_filepathid1memory_viz_argsid3includeid6snapshot_countsid8id2SnapshotManager123id9int diff --git a/tests/test_debug/snapshot_manager_testing_snapshots/func_multi_line/snapshot-2.svg b/tests/test_debug/snapshot_manager_testing_snapshots/func_multi_line/snapshot-2.svg index 68558b01e..790deaf90 100644 --- a/tests/test_debug/snapshot_manager_testing_snapshots/func_multi_line/snapshot-2.svg +++ b/tests/test_debug/snapshot_manager_testing_snapshots/func_multi_line/snapshot-2.svg @@ -1,4 +1,4 @@ -output_pathid1managerid2numid9some_stringid10func_multi_line"/tmp/test_results/func_multi_line"id1str"--roughjs-config"id4str"seed=12345"id5strid4id5id3list"func_multi_line"id7strid7id6tuple2id8intoutput_filepathid1memory_viz_argsid3includeid6snapshot_countsid8id2SnapshotManager123id9int"Hello, world"id10str diff --git a/tests/test_debug/snapshot_manager_testing_snapshots/func_multi_line/snapshot-3.svg b/tests/test_debug/snapshot_manager_testing_snapshots/func_multi_line/snapshot-3.svg index a5f70c9f0..09b73eb22 100644 --- a/tests/test_debug/snapshot_manager_testing_snapshots/func_multi_line/snapshot-3.svg +++ b/tests/test_debug/snapshot_manager_testing_snapshots/func_multi_line/snapshot-3.svg @@ -1,4 +1,4 @@ -output_pathid1managerid2numid9some_stringid10num2id11func_multi_line"/tmp/test_results/func_multi_line"id1str"--roughjs-config"id4str"seed=12345"id5strid4id5id3list"func_multi_line"id7strid7id6tuple3id8intoutput_filepathid1memory_viz_argsid3includeid6snapshot_countsid8id2SnapshotManager123id9int"Hello, world"id10str321id11int diff --git a/tests/test_debug/snapshot_manager_testing_snapshots/func_multi_line/snapshot-4.svg b/tests/test_debug/snapshot_manager_testing_snapshots/func_multi_line/snapshot-4.svg index 3e2a51de3..844c20427 100644 --- a/tests/test_debug/snapshot_manager_testing_snapshots/func_multi_line/snapshot-4.svg +++ b/tests/test_debug/snapshot_manager_testing_snapshots/func_multi_line/snapshot-4.svg @@ -1,4 +1,4 @@ -output_pathid1managerid2numid9some_stringid10num2id11arrid12func_multi_line"/tmp/test_results/func_multi_line"id1str"--roughjs-config"id4str"seed=12345"id5strid4id5id3list"func_multi_line"id7strid7id6tuple4id8intoutput_filepathid1memory_viz_argsid3includeid6snapshot_countsid8id2SnapshotManager123id9int"Hello, world"id10str321id11int"string 123321"id13strid10id13id12list diff --git a/tests/test_debug/snapshot_manager_testing_snapshots/func_mutation/snapshot-0.svg b/tests/test_debug/snapshot_manager_testing_snapshots/func_mutation/snapshot-0.svg index 7bc5c1824..74686a881 100644 --- a/tests/test_debug/snapshot_manager_testing_snapshots/func_mutation/snapshot-0.svg +++ b/tests/test_debug/snapshot_manager_testing_snapshots/func_mutation/snapshot-0.svg @@ -1,4 +1,4 @@ -output_pathid1managerid2func_mutation"/tmp/test_results/func_mutation"id1str"--roughjs-config"id4str"seed=12345"id5strid4id5id3list"func_mutation"id7strid7id6tupleoutput_filepathid1memory_viz_argsid3includeid6id2SnapshotManager diff --git a/tests/test_debug/snapshot_manager_testing_snapshots/func_mutation/snapshot-1.svg b/tests/test_debug/snapshot_manager_testing_snapshots/func_mutation/snapshot-1.svg index 1d1da554e..899f18a1f 100644 --- a/tests/test_debug/snapshot_manager_testing_snapshots/func_mutation/snapshot-1.svg +++ b/tests/test_debug/snapshot_manager_testing_snapshots/func_mutation/snapshot-1.svg @@ -1,4 +1,4 @@ -output_pathid1managerid2numid9func_mutation"/tmp/test_results/func_mutation"id1str"--roughjs-config"id4str"seed=12345"id5strid4id5id3list"func_mutation"id7strid7id6tuple1id8intoutput_filepathid1memory_viz_argsid3includeid6snapshot_countsid8id2SnapshotManager123id9int diff --git a/tests/test_debug/snapshot_manager_testing_snapshots/func_mutation/snapshot-2.svg b/tests/test_debug/snapshot_manager_testing_snapshots/func_mutation/snapshot-2.svg index 21f01a6b9..b86d9ff02 100644 --- a/tests/test_debug/snapshot_manager_testing_snapshots/func_mutation/snapshot-2.svg +++ b/tests/test_debug/snapshot_manager_testing_snapshots/func_mutation/snapshot-2.svg @@ -1,4 +1,4 @@ -output_pathid1managerid2numid9func_mutation"/tmp/test_results/func_mutation"id1str"--roughjs-config"id4str"seed=12345"id5strid4id5id3list"func_mutation"id7strid7id6tuple2id8intoutput_filepathid1memory_viz_argsid3includeid6snapshot_countsid8id2SnapshotManager321id9int diff --git a/tests/test_debug/snapshot_manager_testing_snapshots/func_one_line/snapshot-0.svg b/tests/test_debug/snapshot_manager_testing_snapshots/func_one_line/snapshot-0.svg index 5b1e26c34..af4f1f13b 100644 --- a/tests/test_debug/snapshot_manager_testing_snapshots/func_one_line/snapshot-0.svg +++ b/tests/test_debug/snapshot_manager_testing_snapshots/func_one_line/snapshot-0.svg @@ -1,4 +1,4 @@ -output_pathid1managerid2func_one_line"/tmp/test_results/func_one_line"id1str"--roughjs-config"id4str"seed=12345"id5strid4id5id3list"func_one_line"id7strid7id6tupleoutput_filepathid1memory_viz_argsid3includeid6id2SnapshotManager diff --git a/tests/test_debug/snapshot_manager_testing_snapshots/func_one_line/snapshot-1.svg b/tests/test_debug/snapshot_manager_testing_snapshots/func_one_line/snapshot-1.svg index 9f7809b7a..6e976d93a 100644 --- a/tests/test_debug/snapshot_manager_testing_snapshots/func_one_line/snapshot-1.svg +++ b/tests/test_debug/snapshot_manager_testing_snapshots/func_one_line/snapshot-1.svg @@ -1,4 +1,4 @@ -output_pathid1managerid2numid9func_one_line"/tmp/test_results/func_one_line"id1str"--roughjs-config"id4str"seed=12345"id5strid4id5id3list"func_one_line"id7strid7id6tuple1id8intoutput_filepathid1memory_viz_argsid3includeid6snapshot_countsid8id2SnapshotManager123id9int diff --git a/tests/test_debug/snapshot_manager_testing_snapshots/func_while/snapshot-0.svg b/tests/test_debug/snapshot_manager_testing_snapshots/func_while/snapshot-0.svg index 8ec5b5706..d361ecffc 100644 --- a/tests/test_debug/snapshot_manager_testing_snapshots/func_while/snapshot-0.svg +++ b/tests/test_debug/snapshot_manager_testing_snapshots/func_while/snapshot-0.svg @@ -1,4 +1,4 @@ -output_pathid1managerid2func_while"/tmp/test_results/func_while"id1str"--roughjs-config"id4str"seed=12345"id5strid4id5id3list"func_while"id7strid7id6tupleoutput_filepathid1memory_viz_argsid3includeid6id2SnapshotManager diff --git a/tests/test_debug/snapshot_manager_testing_snapshots/func_while/snapshot-1.svg b/tests/test_debug/snapshot_manager_testing_snapshots/func_while/snapshot-1.svg index 87caac418..f20565a54 100644 --- a/tests/test_debug/snapshot_manager_testing_snapshots/func_while/snapshot-1.svg +++ b/tests/test_debug/snapshot_manager_testing_snapshots/func_while/snapshot-1.svg @@ -1,4 +1,4 @@ -output_pathid1managerid2numid9func_while"/tmp/test_results/func_while"id1str"--roughjs-config"id4str"seed=12345"id5strid4id5id3list"func_while"id7strid7id6tuple1id8intoutput_filepathid1memory_viz_argsid3includeid6snapshot_countsid8id2SnapshotManager0id9int diff --git a/tests/test_debug/snapshot_manager_testing_snapshots/func_while/snapshot-2.svg b/tests/test_debug/snapshot_manager_testing_snapshots/func_while/snapshot-2.svg index cfcb5e232..a888424d1 100644 --- a/tests/test_debug/snapshot_manager_testing_snapshots/func_while/snapshot-2.svg +++ b/tests/test_debug/snapshot_manager_testing_snapshots/func_while/snapshot-2.svg @@ -1,4 +1,4 @@ -output_pathid1managerid2numid9func_while"/tmp/test_results/func_while"id1str"--roughjs-config"id4str"seed=12345"id5strid4id5id3list"func_while"id7strid7id6tuple2id8intoutput_filepathid1memory_viz_argsid3includeid6snapshot_countsid8id2SnapshotManager0id9int diff --git a/tests/test_debug/snapshot_manager_testing_snapshots/func_while/snapshot-3.svg b/tests/test_debug/snapshot_manager_testing_snapshots/func_while/snapshot-3.svg index 86688c90b..bfd556ae2 100644 --- a/tests/test_debug/snapshot_manager_testing_snapshots/func_while/snapshot-3.svg +++ b/tests/test_debug/snapshot_manager_testing_snapshots/func_while/snapshot-3.svg @@ -1,4 +1,4 @@ -output_pathid1managerid2numid9func_while"/tmp/test_results/func_while"id1str"--roughjs-config"id4str"seed=12345"id5strid4id5id3list"func_while"id7strid7id6tuple3id8intoutput_filepathid1memory_viz_argsid3includeid6snapshot_countsid8id2SnapshotManager1id9int diff --git a/tests/test_debug/snapshot_manager_testing_snapshots/func_while/snapshot-4.svg b/tests/test_debug/snapshot_manager_testing_snapshots/func_while/snapshot-4.svg index 4a02e56fd..98f6d5565 100644 --- a/tests/test_debug/snapshot_manager_testing_snapshots/func_while/snapshot-4.svg +++ b/tests/test_debug/snapshot_manager_testing_snapshots/func_while/snapshot-4.svg @@ -1,4 +1,4 @@ -output_pathid1managerid2numid9func_while"/tmp/test_results/func_while"id1str"--roughjs-config"id4str"seed=12345"id5strid4id5id3list"func_while"id7strid7id6tuple4id8intoutput_filepathid1memory_viz_argsid3includeid6snapshot_countsid8id2SnapshotManager1id9int diff --git a/tests/test_debug/snapshot_manager_testing_snapshots/func_while/snapshot-5.svg b/tests/test_debug/snapshot_manager_testing_snapshots/func_while/snapshot-5.svg index 089361aad..4bc3be8bc 100644 --- a/tests/test_debug/snapshot_manager_testing_snapshots/func_while/snapshot-5.svg +++ b/tests/test_debug/snapshot_manager_testing_snapshots/func_while/snapshot-5.svg @@ -1,4 +1,4 @@ -output_pathid1managerid2numid9func_while"/tmp/test_results/func_while"id1str"--roughjs-config"id4str"seed=12345"id5strid4id5id3list"func_while"id7strid7id6tuple5id8intoutput_filepathid1memory_viz_argsid3includeid6snapshot_countsid8id2SnapshotManager2id9int diff --git a/tests/test_debug/snapshot_manager_testing_snapshots/func_while/snapshot-6.svg b/tests/test_debug/snapshot_manager_testing_snapshots/func_while/snapshot-6.svg index 76d3b4483..ad1fbe12f 100644 --- a/tests/test_debug/snapshot_manager_testing_snapshots/func_while/snapshot-6.svg +++ b/tests/test_debug/snapshot_manager_testing_snapshots/func_while/snapshot-6.svg @@ -1,4 +1,4 @@ -output_pathid1managerid2numid9func_while"/tmp/test_results/func_while"id1str"--roughjs-config"id4str"seed=12345"id5strid4id5id3list"func_while"id7strid7id6tuple6id8intoutput_filepathid1memory_viz_argsid3includeid6snapshot_countsid8id2SnapshotManager2id9int diff --git a/tests/test_debug/snapshot_manager_testing_snapshots/func_while/snapshot-7.svg b/tests/test_debug/snapshot_manager_testing_snapshots/func_while/snapshot-7.svg index 54e4b8829..0a6d8116f 100644 --- a/tests/test_debug/snapshot_manager_testing_snapshots/func_while/snapshot-7.svg +++ b/tests/test_debug/snapshot_manager_testing_snapshots/func_while/snapshot-7.svg @@ -1,4 +1,4 @@ -output_pathid1managerid2numid9func_while"/tmp/test_results/func_while"id1str"--roughjs-config"id4str"seed=12345"id5strid4id5id3list"func_while"id7strid7id6tuple7id8intoutput_filepathid1memory_viz_argsid3includeid6snapshot_countsid8id2SnapshotManager3id9int diff --git a/tests/test_debug/snapshot_manager_testing_snapshots/func_while/snapshot-8.svg b/tests/test_debug/snapshot_manager_testing_snapshots/func_while/snapshot-8.svg index 9a4b7ff1a..d3eda5340 100644 --- a/tests/test_debug/snapshot_manager_testing_snapshots/func_while/snapshot-8.svg +++ b/tests/test_debug/snapshot_manager_testing_snapshots/func_while/snapshot-8.svg @@ -1,4 +1,4 @@ -output_pathid1managerid2numid9func_while"/tmp/test_results/func_while"id1str"--roughjs-config"id4str"seed=12345"id5strid4id5id3list"func_while"id7strid7id6tuple8id8intoutput_filepathid1memory_viz_argsid3includeid6snapshot_countsid8id2SnapshotManager3id9int diff --git a/tests/test_debug/test_snapshot_manager.py b/tests/test_debug/test_snapshot_manager.py index 243c5f912..37098b98d 100644 --- a/tests/test_debug/test_snapshot_manager.py +++ b/tests/test_debug/test_snapshot_manager.py @@ -1,3 +1,5 @@ +from __future__ import annotations + import os.path import shutil @@ -63,10 +65,7 @@ def assert_output_files_match(snapshot_count: int, output_path: str, expected_pa for i in range(snapshot_count): actual_file = os.path.join(output_path, f"snapshot-{i}.svg") expected_file = os.path.join(expected_path, f"snapshot-{i}.svg") - with ( - open(actual_file) as actual_file, - open(expected_file) as expected_file, - ): + with open(actual_file) as actual_file, open(expected_file) as expected_file: actual_svg = actual_file.read() expected_svg = expected_file.read() assert actual_svg == expected_svg