Skip to content

Commit

Permalink
[Tests][KiKit Present][Added] Local and File cases
Browse files Browse the repository at this point in the history
  • Loading branch information
set-soft committed Jan 19, 2024
1 parent e94c4a0 commit bd4cefc
Show file tree
Hide file tree
Showing 3 changed files with 29 additions and 4 deletions.
24 changes: 24 additions & 0 deletions tests/test_plot/test_misc.py
Original file line number Diff line number Diff line change
Expand Up @@ -1926,6 +1926,30 @@ def test_present_1(test_dir):
ctx.clean_up(keep_project=True)


@pytest.mark.slow
@pytest.mark.skipif(not context.ki7(), reason="Just testing with 7")
def test_present_2(test_dir):
prj = 'light_control'
ctx = context.TestContext(test_dir, prj, 'kikit_present_local_1', 'Present/Local_1')
ctx.run()
ctx.expect_out_file_d(['boards/light_control-back.svg', 'boards/light_control-front.svg',
'boards/light_control-gerbers.zip', 'boards/light_control.kicad_pcb',
'css/styles.css', 'index.html'])
ctx.clean_up(keep_project=True)


@pytest.mark.slow
@pytest.mark.skipif(not context.ki7(), reason="Just testing with 7")
def test_present_3(test_dir):
prj = 'light_control'
ctx = context.TestContext(test_dir, prj, 'kikit_present_file_1', 'Present/Files')
ctx.run()
ctx.expect_out_file_d(['boards/light_control-back.png', 'boards/light_control-front.png',
'boards/light_control-gerbers.png', '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
Expand Down
6 changes: 3 additions & 3 deletions tests/yaml_samples/kikit_present_file_1.kibot.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -12,9 +12,9 @@ outputs:
boards:
mode: file
comment: This is a comment
front_image: pp/front.png
back_image: pp/back.png
gerbers: pp/gerbers.zip
front_image: docs/images/kibot_370x200b.png
back_image: docs/images/kibot_370x200.png
gerbers: docs/images/Esquema.png
resources: 'tests/data/silly_project.md'
# template: 'default'
repository: 'https://github.com/INTI-CMNB/KiBot/'
Expand Down
3 changes: 2 additions & 1 deletion tests/yaml_samples/kikit_present_local_1.kibot.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,8 @@ outputs:
comment: This is a comment
name: Light control
# back_image: Raytraced
back_image: Blender
# back_image: Blender
back_image: PcbDraw
repository: 'https://github.com/INTI-CMNB/KiBot/'

- name: PcbDraw
Expand Down

0 comments on commit bd4cefc

Please sign in to comment.