diff --git a/CHANGELOG.md b/CHANGELOG.md index 892ed3ab7..78f71ccff 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -13,6 +13,8 @@ and adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html). ### 🐛 Bug fixes +- Fixed issue with `snapshot.py` where the `memory_viz_args` parameter was not being respected. + ### 🔧 Internal changes - Renamed `ExprWrapper` class to `Z3Parser` diff --git a/python_ta/debug/snapshot.py b/python_ta/debug/snapshot.py index bca1781f5..3090aa1d6 100644 --- a/python_ta/debug/snapshot.py +++ b/python_ta/debug/snapshot.py @@ -69,7 +69,7 @@ def snapshot( # Set up command command = ["npx", "memory-viz"] if memory_viz_args: - command.extend(memory_viz_args) + command.append(memory_viz_args) # Ensure valid memory_viz version if memory_viz_version != "latest" and parse(memory_viz_version) < Version("0.3.1"): diff --git a/tests/test_debug/test_snapshot.py b/tests/test_debug/test_snapshot.py index 41ad1d62a..1ae327533 100644 --- a/tests/test_debug/test_snapshot.py +++ b/tests/test_debug/test_snapshot.py @@ -2,8 +2,6 @@ Test suite for snapshot functions """ -from __future__ import annotations - import json import os import subprocess @@ -585,11 +583,7 @@ def test_snapshot_save_create_svg(tmp_path): current_directory = os.path.dirname(os.path.abspath(__file__)) snapshot_save_path = os.path.join(current_directory, "snapshot_save_file.py") result = subprocess.run( - [ - sys.executable, - snapshot_save_path, - os.path.join(tmp_path, "test_snapshot_save_create_svg0.svg"), - ], + [sys.executable, snapshot_save_path, os.path.abspath(tmp_path)], capture_output=True, text=True, check=True,