Skip to content

Commit

Permalink
Fixed snapshot.py to respect the memory_viz_args
Browse files Browse the repository at this point in the history
  • Loading branch information
CulmoneY committed Sep 18, 2024
1 parent c4c18be commit ac2ea5d
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 8 deletions.
2 changes: 2 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -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`
Expand Down
2 changes: 1 addition & 1 deletion python_ta/debug/snapshot.py
Original file line number Diff line number Diff line change
Expand Up @@ -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"):
Expand Down
8 changes: 1 addition & 7 deletions tests/test_debug/test_snapshot.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,6 @@
Test suite for snapshot functions
"""

from __future__ import annotations

import json
import os
import subprocess
Expand Down Expand Up @@ -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,
Expand Down

0 comments on commit ac2ea5d

Please sign in to comment.