QA: Remove call to obsoleted function
This commit is contained in:
parent
f4d12fb19c
commit
2d8707a3d0
|
@ -60,31 +60,6 @@ class TestPCBLoad(unittest.TestCase):
|
|||
self.verify_text(text[1], 176149000, 64643000, pcbnew.B_Cu,
|
||||
u'Actionneur\nPiezo New Amp\nV02')
|
||||
|
||||
def test_text_as_segments(self):
|
||||
footprint = self.pcb.FindFootprintByReference("U1")
|
||||
reference = footprint.Reference()
|
||||
segments = [[p.x, p.y] for p in reference.TransformToSegmentList()]
|
||||
expected_segments = [
|
||||
[141901333, 69196857], [143340666, 69196857], [143340666, 69196857],
|
||||
[143510000, 69142428], [143510000, 69142428], [143594666, 69088000],
|
||||
[143594666, 69088000], [143679333, 68979142], [143679333, 68979142],
|
||||
[143679333, 68761428], [143679333, 68761428], [143594666, 68652571],
|
||||
[143594666, 68652571], [143510000, 68598142], [143510000, 68598142],
|
||||
[143340666, 68543714], [143340666, 68543714], [141901333, 68543714],
|
||||
[143679333, 67400714], [143679333, 68053857], [143679333, 67727285],
|
||||
[141901333, 67727285], [141901333, 67727285], [142155333, 67836142],
|
||||
[142155333, 67836142], [142324666, 67945000], [142324666, 67945000],
|
||||
[142409333, 68053857]
|
||||
]
|
||||
|
||||
# Compare the value of each x and y coord of segments and expected_segments
|
||||
# To avoid false positive due to rounding issues allow a difference of 1 unit
|
||||
for i in range( len(segments) ):
|
||||
p1=segments[i]
|
||||
p2=expected_segments[i]
|
||||
self.assertLessEqual(abs(p1[0] - p2[0]), 1)
|
||||
self.assertLessEqual(abs(p1[1] - p2[1]), 1)
|
||||
|
||||
def verify_text(self, text, x, y, layer, s):
|
||||
self.assertEquals(list(text.GetPosition()), [x, y])
|
||||
self.assertEquals(text.GetLayer(), layer)
|
||||
|
|
Loading…
Reference in New Issue