Spaces:
Running
Running
File size: 436 Bytes
5a79264 | 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 | 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
|