Added (passing) test for Excellon flow.

This commit is contained in:
Juan Pablo Caram
2016-07-02 16:47:15 -04:00
parent d63f9cbd43
commit 01c2feca98
3 changed files with 299 additions and 2 deletions

View File

@@ -10,6 +10,13 @@ import tempfile
class GerberFlowTestCase(unittest.TestCase):
"""
This is a top-level test covering the Gerber-to-GCode
generation workflow.
THIS IS A REQUIRED TEST FOR ANY UPDATES.
"""
filename = 'simple1.gbr'
@@ -172,10 +179,12 @@ class GerberFlowTestCase(unittest.TestCase):
assert isinstance(cnc_obj, FlatCAMCNCjob)
output_filename = ""
# get system temporary file(try create it and delete also)
with tempfile.NamedTemporaryFile(prefix='unittest.', suffix="." + cnc_name + '.gcode', delete=True) as tmp_file:
with tempfile.NamedTemporaryFile(prefix='unittest.',
suffix="." + cnc_name + '.gcode',
delete=True) as tmp_file:
output_filename = tmp_file.name
cnc_obj.export_gcode(output_filename)
self.assertTrue(os.path.isfile(output_filename))
os.remove(output_filename)
print names
print names