Fix paths in the python tests

Can't actually test on Windows without making that a setup adventure
This commit is contained in:
Mark Roszko 2023-04-25 12:29:47 +00:00
parent e45b6c441a
commit 50b916cb73
5 changed files with 6 additions and 6 deletions

View File

@ -6,7 +6,7 @@ import pdb
class TestPCBLoad(unittest.TestCase):
def setUp(self):
self.pcb = pcbnew.LoadBoard("../../data/pcbnew/complex_hierarchy.kicad_pcb")
self.pcb = pcbnew.LoadBoard("../data/pcbnew/complex_hierarchy.kicad_pcb")
def test_pcb_load(self):
self.assertNotEqual(self.pcb,None)

View File

@ -17,7 +17,7 @@ NEW_NAME = 'My_Fancy_Layer_Name'
class TestBoardClass(unittest.TestCase):
def setUp(self):
self.pcb = LoadBoard("../../data/pcbnew/complex_hierarchy.kicad_pcb")
self.pcb = LoadBoard("../data/pcbnew/complex_hierarchy.kicad_pcb")
self.TITLE="Test Board"
self.COMMENT1="For load/save test"
self.FILENAME=tempfile.mktemp()+".kicad_pcb"
@ -122,7 +122,7 @@ class TestBoardClass(unittest.TestCase):
self.assertEqual(pcb.GetLayerID(B_CU), b_cu_id)
def test_footprint_properties(self):
pcb = LoadBoard("../../data/pcbnew/custom_fields.kicad_pcb")
pcb = LoadBoard("../data/pcbnew/custom_fields.kicad_pcb")
footprint = pcb.FindFootprintByReference('J1')
expected_properties = {
'Sheet file': 'custom_fields.kicad_sch',

View File

@ -4,7 +4,7 @@ import pcbnew
class TestPads(unittest.TestCase):
def setUp(self):
self.pcb = pcbnew.LoadBoard("../../data/pcbnew/custom_pads.kicad_pcb")
self.pcb = pcbnew.LoadBoard("../data/pcbnew/custom_pads.kicad_pcb")
def test_custom_pads_outline(self):
custom_pad1 = self.pcb.FindFootprintByReference("SB1").Pads()[0]

View File

@ -4,7 +4,7 @@ import pcbnew
class TestTracks(unittest.TestCase):
def setUp(self):
self.pcb = pcbnew.LoadBoard("../../data/pcbnew/tracks_arcs_vias.kicad_pcb")
self.pcb = pcbnew.LoadBoard("../data/pcbnew/tracks_arcs_vias.kicad_pcb")
def test_tracks(self):
tracks = [t for t in self.pcb.Tracks() if t.GetClass() == 'PCB_TRACK']

View File

@ -10,7 +10,7 @@ class TestConnectivity(unittest.TestCase):
def setUp(self):
"""Setup shared attributes."""
self.pcb = pcbnew.LoadBoard("../../data/pcbnew/complex_hierarchy.kicad_pcb")
self.pcb = pcbnew.LoadBoard("../data/pcbnew/complex_hierarchy.kicad_pcb")
self.connectivity = self.pcb.GetConnectivity()
self.nets = self.pcb.GetNetsByName()