Option to override user's defaults. Needed for unit testing.

This commit is contained in:
Juan Pablo Caram
2015-10-28 12:00:56 -04:00
parent fb98d6306b
commit 8f5cc7a02d
6 changed files with 50 additions and 22 deletions

View File

@@ -379,7 +379,8 @@ class Geometry(object):
"""
log.debug("camlib.clear_polygon()")
assert type(polygon) == Polygon or type(polygon) == MultiPolygon
assert type(polygon) == Polygon or type(polygon) == MultiPolygon, \
"Expected a Polygon or MultiPolygon, got %s" % type(polygon)
## The toolpaths
# Index first and last points in paths
@@ -2717,7 +2718,8 @@ class CNCjob(Geometry):
:param tolerance:
:return: None
"""
assert isinstance(geometry, Geometry)
assert isinstance(geometry, Geometry), \
"Expected a Geometry, got %s" % type(geometry)
log.debug("generate_from_geometry_2()")
## Flatten the geometry