pull/254/head
Joe Marshall 2024-01-13 07:48:03 +00:00
rodzic 3563a853bf
commit 638d22c3e3
2 zmienionych plików z 1106 dodań i 1 usunięć

Wyświetl plik

@ -2,6 +2,7 @@ import difflib
import unittest
import subprocess
import os
import sys
class BlenderCAMTest(unittest.TestCase):
@classmethod
@ -64,8 +65,11 @@ class BlenderCAMTest(unittest.TestCase):
# Compare the generated and expected gcode for each operation
for gcode_file in test_case['gcode_files']:
with self.subTest(operation=f"{test_case['subdir_name']}/{gcode_file}"):
generated = self.get_gcode_from_file(gcode_file[1:])
generated = self.get_gcode_from_file(gcode_file[1:])
expected = self.get_gcode_from_file(gcode_file)
if sys.platform=='darwin' and os.path.exists(gcode_file+".mac"):
expected = self.get_gcode_from_file(gcode_file+".mac")
self.assertMultiLineEqual(generated, expected,
msg = "\n"+self.get_diff(gcode_file[1:], gcode_file))
os.remove(gcode_file[1:]) # cleanup generated file unless test fails