Skip to content

Commit

Permalink
[Tests][Import][Groups][Added] simple test
Browse files Browse the repository at this point in the history
  • Loading branch information
set-soft committed Jan 19, 2024
1 parent 95fd5cf commit 5033a29
Show file tree
Hide file tree
Showing 2 changed files with 28 additions and 0 deletions.
20 changes: 20 additions & 0 deletions tests/test_plot/test_misc.py
Original file line number Diff line number Diff line change
Expand Up @@ -1915,3 +1915,23 @@ def test_present_1(test_dir):
'boards/light_control-gerbers.zip', 'boards/light_control.kicad_pcb',
'css/styles.css', 'index.html'])
ctx.clean_up(keep_project=True)


def test_groups_1(test_dir):
""" Groups definitions """
prj = 'simple_2layer' # fake
ctx = context.TestContext(test_dir, prj, 'groups_1')
ctx.run(no_board_file=True, no_out_dir=True, extra=['--list'])
ctx.search_out(['fab: gerbers, excellon_drill, position', 'plot: SVG, PcbDraw, PcbDraw2', 'fab_svg: fab, SVG'])
ctx.clean_up()


def test_groups_2(test_dir):
""" Imported groups and outputs """
prj = 'simple_2layer' # fake
ctx = context.TestContext(test_dir, prj, 'import_test_internal_group')
ctx.run(no_board_file=True, no_out_dir=True, extra=['--only-groups', '--only-names', '--list'])
ctx.search_out('_Elecrow')
ctx.run(no_board_file=True, no_out_dir=True, extra=['--only-names', '--list'])
ctx.search_out(['_Elecrow_compress', '_Elecrow_drill', '_Elecrow_gerbers'])
ctx.clean_up()
8 changes: 8 additions & 0 deletions tests/yaml_samples/import_test_internal_group.kibot.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
# Here we import a group ... hoping its outputs are also imported
kibot:
version: 1

import:
- file: Elecrow
groups:
- _Elecrow

0 comments on commit 5033a29

Please sign in to comment.