Updated tests after last change (edge transformation behaviour)

This commit is contained in:
Matthias Koefferlein
2019-02-10 16:21:44 +01:00
parent a81a8cdbc8
commit d35e86e189
2 changed files with 28 additions and 28 deletions
+14 -14
View File
@@ -76,8 +76,8 @@ class DBTransTests(unittest.TestCase):
self.assertEqual( str(pya.Trans(pya.Trans.R180, pya.DVector(5,-7))), "r180 5,-7" )
self.assertEqual( str(pya.Trans(pya.Trans.R180)), "r180 0,0" )
self.assertEqual( str(e.trans( pya.Edge(0, 1, 2, 3) )), "(-1,0;-3,-2)" )
self.assertEqual( str(( e * pya.Edge(0, 1, 2, 3) )), "(-1,0;-3,-2)" )
self.assertEqual( str(e.trans( pya.Edge(0, 1, 2, 3) )), "(-3,-2;-1,0)" )
self.assertEqual( str(( e * pya.Edge(0, 1, 2, 3) )), "(-3,-2;-1,0)" )
self.assertEqual( str(e.trans( pya.Box(0, 1, 2, 3) )), "(-3,-2;-1,0)" )
self.assertEqual( str(( e * pya.Box(0, 1, 2, 3) )), "(-3,-2;-1,0)" )
self.assertEqual( str(e.trans( pya.Text("text", pya.Vector(0, 1)) )), "('text',m135 -1,0)" )
@@ -152,16 +152,16 @@ class DBTransTests(unittest.TestCase):
self.assertEqual( str(c.s_trans()), "m135 0,0" )
self.assertAlmostEqual( c.angle, 270 )
self.assertEqual( str(c.trans( pya.Edge(0, 1, 2, 3) )), "(-1,0;-3,-2)" )
self.assertEqual( str(( c * pya.Edge(0, 1, 2, 3) )), "(-1,0;-3,-2)" )
self.assertEqual( str(c.trans( pya.Box(0, 1, 2, 3) )), "(-3,-2;-1,0)" )
self.assertEqual( str(( c * pya.Box(0, 1, 2, 3) )), "(-3,-2;-1,0)" )
self.assertEqual( str(c.trans( pya.Text("text", pya.Vector(0, 1)) )), "('text',m135 -1,0)" )
self.assertEqual( str(( c * pya.Text("text", pya.Vector(0, 1)) )), "('text',m135 -1,0)" )
self.assertEqual( str(c.trans( pya.Polygon( [ pya.Point(0, 1), pya.Point(2, -3), pya.Point(4, 5) ] ) )), "(-5,-4;-1,0;3,-2)" )
self.assertEqual( str(( c * pya.Polygon( [ pya.Point(0, 1), pya.Point(2, -3), pya.Point(4, 5) ] ) )), "(-5,-4;-1,0;3,-2)" )
self.assertEqual( str(c.trans( pya.Path( [ pya.Point(0, 1), pya.Point(2, 3) ], 10 ) )), "(-1,0;-3,-2) w=10 bx=0 ex=0 r=false" )
self.assertEqual( str(( c * pya.Path( [ pya.Point(0, 1), pya.Point(2, 3) ], 10 ) )), "(-1,0;-3,-2) w=10 bx=0 ex=0 r=false" )
self.assertEqual( str(c.trans( pya.DEdge(0, 1, 2, 3) )), "(-3,-2;-1,0)" )
self.assertEqual( str(( c * pya.DEdge(0, 1, 2, 3) )), "(-3,-2;-1,0)" )
self.assertEqual( str(c.trans( pya.DBox(0, 1, 2, 3) )), "(-3,-2;-1,0)" )
self.assertEqual( str(( c * pya.DBox(0, 1, 2, 3) )), "(-3,-2;-1,0)" )
self.assertEqual( str(c.trans( pya.DText("text", pya.DVector(0, 1)) )), "('text',m135 -1,0)" )
self.assertEqual( str(( c * pya.DText("text", pya.DVector(0, 1)) )), "('text',m135 -1,0)" )
self.assertEqual( str(c.trans( pya.DPolygon( [ pya.DPoint(0, 1), pya.DPoint(2, -3), pya.DPoint(4, 5) ] ) )), "(-5,-4;-1,0;3,-2)" )
self.assertEqual( str(( c * pya.DPolygon( [ pya.DPoint(0, 1), pya.DPoint(2, -3), pya.DPoint(4, 5) ] ) )), "(-5,-4;-1,0;3,-2)" )
self.assertEqual( str(c.trans( pya.DPath( [ pya.DPoint(0, 1), pya.DPoint(2, 3) ], 10 ) )), "(-1,0;-3,-2) w=10 bx=0 ex=0 r=false" )
self.assertEqual( str(( c * pya.DPath( [ pya.DPoint(0, 1), pya.DPoint(2, 3) ], 10 ) )), "(-1,0;-3,-2) w=10 bx=0 ex=0 r=false" )
c = pya.DCplxTrans.from_itrans( pya.CplxTrans.M135 )
self.assertEqual( str(c), "m135 *1 0,0" )
@@ -279,8 +279,8 @@ class DBTransTests(unittest.TestCase):
c.mirror = True
self.assertEqual( str(c), "m135 1,7" )
self.assertEqual( str(e.trans( pya.Edge(0, 1, 2, 3) )), "(-1,0;-3,-2)" )
self.assertEqual( str(( e * pya.Edge(0, 1, 2, 3) )), "(-1,0;-3,-2)" )
self.assertEqual( str(e.trans( pya.Edge(0, 1, 2, 3) )), "(-3,-2;-1,0)" )
self.assertEqual( str(( e * pya.Edge(0, 1, 2, 3) )), "(-3,-2;-1,0)" )
self.assertEqual( str(e.trans( pya.Box(0, 1, 2, 3) )), "(-3,-2;-1,0)" )
self.assertEqual( str(( e * pya.Box(0, 1, 2, 3) )), "(-3,-2;-1,0)" )
self.assertEqual( str(e.trans( pya.Text("text", pya.Vector(0, 1)) )), "('text',m135 -1,0)" )