Spaces:
Sleeping
Sleeping
Download tests/test_gcode_viewer.py from CyGuy8/ParallelPrint: direct link, hf CLI and curl.
- Browser
- Download file 436 Bytes
-
https://huggingface.co/spaces/CyGuy8/ParallelPrint/resolve/c8d77bed05422bcbf0d81908b6a72d2855a2eb08/tests/test_gcode_viewer.py
- Command line
-
hf download hf://spaces/CyGuy8/ParallelPrint@c8d77bed05422bcbf0d81908b6a72d2855a2eb08/tests/test_gcode_viewer.py
-
curl -L -o test_gcode_viewer.py https://huggingface.co/spaces/CyGuy8/ParallelPrint/resolve/c8d77bed05422bcbf0d81908b6a72d2855a2eb08/tests/test_gcode_viewer.py
436 Bytes
| from __future__ import annotations | |
| from gcode_viewer import parse_gcode_path | |
| def test_parse_gcode_classifies_g0_as_travel_and_g1_as_print() -> None: | |
| parsed = parse_gcode_path( | |
| "\n".join( | |
| [ | |
| "G91", | |
| "G0 X1 Y0 ; travel", | |
| "G1 X0 Y1 ; print", | |
| ] | |
| ) | |
| ) | |
| assert len(parsed["travel_segments"]) == 1 | |
| assert len(parsed["print_segments"]) == 1 | |