Skip to content

Commit

Permalink
Merge pull request #90 from mvnmgrx/test_zones_on_outer_layers
Browse files Browse the repository at this point in the history
Tests: Added test case for zones on outer layers only
  • Loading branch information
mvnmgrx authored Apr 22, 2023
2 parents e38944b + 463cef1 commit 4ca6935
Show file tree
Hide file tree
Showing 2 changed files with 32 additions and 0 deletions.
8 changes: 8 additions & 0 deletions tests/test_board.py
Original file line number Diff line number Diff line change
Expand Up @@ -92,6 +92,14 @@ def test_pcbPlotParams(self):
board = Board().from_file(self.testData.pathToTestFile)
self.assertTrue(to_file_and_compare(board, self.testData))

def test_zoneOnOuterLayersOnly(self):
"""Tests the parsing of a zone that is only on the outer board layers (F.Cu and B.Cu).
Regression test for bug in PR #89."""
self.testData.compareToTestFile = True
self.testData.pathToTestFile = path.join(BOARD_BASE, 'test_zoneOnOuterLayersOnly')
board = Board().from_file(self.testData.pathToTestFile)
self.assertTrue(to_file_and_compare(board, self.testData))

class Tests_Board_Since_V7(unittest.TestCase):
"""Test cases for Boards since KiCad 7"""

Expand Down
24 changes: 24 additions & 0 deletions tests/testdata/board/test_zoneOnOuterLayersOnly
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
(kicad_pcb (version 20221018) (generator pcbnew)

(general
(thickness 1.6)
)

(paper "A4")
(layers
(0 "F.Cu" signal)
(31 "B.Cu" signal)
)

(setup
(pad_to_mask_clearance 0)
)

(net 0 "")

(zone (net 0) (net_name "") (layers "F&B.Cu") (tstamp 3562b45e-4bdd-495d-8608-16ebe61c5885) (hatch edge 0.5)
(connect_pads (clearance 0.5))
(min_thickness 0.25) (filled_areas_thickness no)
(fill yes (thermal_gap 0.5) (thermal_bridge_width 0.5) (island_removal_mode 1) (island_area_min 10))
)
)

0 comments on commit 4ca6935

Please # to comment.