QA: Remove call to obsoleted function

This commit is contained in:
Seth Hillbrand 2022-01-08 19:40:33 -08:00
parent f4d12fb19c
commit 2d8707a3d0
1 changed files with 0 additions and 25 deletions

View File

@ -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)