From 23dc2059f06e1f8e3abc771f1aef7f762979fb45 Mon Sep 17 00:00:00 2001 From: sopak Date: Sun, 24 Apr 2016 22:05:07 +0200 Subject: [PATCH] implement test_TclCommandIsolate --- tests/tclCommands/__init__.py | 2 +- tests/tclCommands/test_TclCommandIsolate.py | 18 ++++++++++++++++++ 2 files changed, 19 insertions(+), 1 deletion(-) create mode 100644 tests/tclCommands/test_TclCommandIsolate.py diff --git a/tests/tclCommands/__init__.py b/tests/tclCommands/__init__.py index 0b91f03b..b60be8a5 100644 --- a/tests/tclCommands/__init__.py +++ b/tests/tclCommands/__init__.py @@ -10,7 +10,7 @@ from test_TclCommandAddPolyline import * # from test_TclCommandExteriors import * from test_TclCommandImportSvg import * # from test_TclCommandInteriors import * -# from test_TclCommandIsolate import * +from test_TclCommandIsolate import * from test_TclCommandNew import * from test_TclCommandNewGeometry import * from test_TclCommandOpenGerber import * diff --git a/tests/tclCommands/test_TclCommandIsolate.py b/tests/tclCommands/test_TclCommandIsolate.py new file mode 100644 index 00000000..3823d614 --- /dev/null +++ b/tests/tclCommands/test_TclCommandIsolate.py @@ -0,0 +1,18 @@ +from FlatCAMObj import FlatCAMGerber + + +def test_isolate(self): + """ + Test isolate gerber + :param self: + :return: + """ + + self.fc.exec_command_test('open_gerber %s/%s -outname %s' + % (self.gerber_files, self.copper_top_filename, self.gerber_top_name)) + gerber_top_obj = self.fc.collection.get_by_name(self.gerber_top_name) + self.assertTrue(isinstance(gerber_top_obj, FlatCAMGerber), "Expected FlatCAMGerber, instead, %s is %s" + % (self.gerber_top_name, type(gerber_top_obj))) + + # isolate traces + self.fc.exec_command_test('isolate %s -dia %f' % (self.gerber_top_name, self.engraver_diameter))