-
Notifications
You must be signed in to change notification settings - Fork 62
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add MemoryViz save feature to debug.snapshot function (#1075)
- Loading branch information
Showing
9 changed files
with
253 additions
and
3 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -20,6 +20,10 @@ jobs: | |
uses: actions/[email protected] | ||
with: | ||
python-version: ${{ matrix.python-version }} | ||
- name: Set up Node.js 18 | ||
uses: actions/setup-node@v4 | ||
with: | ||
node-version: 18 | ||
- name: Set up graphviz | ||
run: | | ||
sudo apt-get install -y graphviz | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,23 @@ | ||
""" | ||
This Python module is designed for testing the snapshot function's ability to, when save is True, | ||
create a snapshot svg at the specified file path. | ||
This module is intended exclusively for testing purposes and should not be used for any other purpose. | ||
""" | ||
|
||
import os | ||
import sys | ||
|
||
from python_ta.debug.snapshot import snapshot | ||
|
||
test_var1a = "David is cool!" | ||
test_var2a = "Students Developing Software" | ||
snapshot( | ||
True, | ||
[ | ||
"--output=" + os.path.abspath(sys.argv[1]), | ||
"--roughjs-config", | ||
"seed=12345", | ||
], | ||
"0.3.1", | ||
) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
""" | ||
This Python module is designed for testing the snapshot function's ability to, when save is True, | ||
return the snapshot svg to stdout. | ||
This module is intended exclusively for testing purposes and should not be used for any other purpose. | ||
""" | ||
|
||
from python_ta.debug.snapshot import snapshot | ||
|
||
test_var1a = "David is cool!" | ||
test_var2a = "Students Developing Software" | ||
snapshot(True, ["--roughjs-config", "seed=12345"], "0.3.1") |
33 changes: 33 additions & 0 deletions
33
...s/test_debug/snapshot_testing_snapshots/snapshot_testing_snapshots_expected.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
33 changes: 33 additions & 0 deletions
33
...debug/snapshot_testing_snapshots/snapshot_testing_snapshots_expected_stdout.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters