Made tests folder importable. Cleaned up tests.

This commit is contained in:
Juan Pablo Caram 2015-11-01 18:07:52 -05:00
parent 051b82009d
commit 24f5ee0d0d
3 changed files with 8 additions and 7 deletions

0
tests/__init__.py Normal file
View File

View File

@ -1,16 +1,17 @@
import unittest
import camlib
class GerberBuffer(unittest.TestCase):
def setUp(self):
self.gerber1 = camlib.Gerber()
self.gerber1.use_buffer_for_union = True
self.gerber1.parse_file("./gerber_files/STM32F4-spindle.cmp")
self.gerber1.parse_file("tests/gerber_files/STM32F4-spindle.cmp")
geometry1 = self.gerber1.solid_geometry
self.geometry1_area = self.compute_area(geometry1)
self.gerber2 = camlib.Gerber()
self.gerber2.use_buffer_for_union = False
self.gerber2.parse_file("./gerber_files/STM32F4-spindle.cmp")
self.gerber2.parse_file("tests/gerber_files/STM32F4-spindle.cmp")
geometry2 = self.gerber2.solid_geometry
self.geometry2_area = self.compute_area (geometry2)

View File

@ -94,7 +94,7 @@ class PaintConnectTest(PaintTestCase):
self.assertEqual(len(result), 1)
self.plot_summary_A(paths, tooldia, result, "WALK expected.")
# self.plot_summary_A(paths, tooldia, result, "WALK expected.")
def test_no_jump1(self):
print "Test: FLY Expected"
@ -116,7 +116,7 @@ class PaintConnectTest(PaintTestCase):
self.assertEqual(len(result), len(paths))
self.plot_summary_A(paths, tooldia, result, "FLY Expected")
# self.plot_summary_A(paths, tooldia, result, "FLY Expected")
def test_no_jump2(self):
print "Test: FLY Expected"
@ -138,7 +138,7 @@ class PaintConnectTest(PaintTestCase):
self.assertEqual(len(result), len(paths))
self.plot_summary_A(paths, tooldia, result, "FLY Expected")
# self.plot_summary_A(paths, tooldia, result, "FLY Expected")
class PaintConnectTest2(PaintTestCase):
@ -172,7 +172,7 @@ class PaintConnectTest2(PaintTestCase):
self.assertEqual(len(result), len(paths))
self.plot_summary_A(paths, tooldia, result, "FLY Expected")
# self.plot_summary_A(paths, tooldia, result, "FLY Expected")
class PaintConnectTest3(PaintTestCase):
@ -205,7 +205,7 @@ class PaintConnectTest3(PaintTestCase):
self.assertEqual(len(result), 1)
self.plot_summary_A(paths, tooldia, result, "WALK Expected")
# self.plot_summary_A(paths, tooldia, result, "WALK Expected")
if __name__ == '__main__':