Skip to content

Commit

Permalink
[Tests][Added] Test for empty definitions
Browse files Browse the repository at this point in the history
  • Loading branch information
set-soft committed Jan 2, 2025
1 parent 91d935f commit fc049f5
Show file tree
Hide file tree
Showing 2 changed files with 26 additions and 0 deletions.
8 changes: 8 additions & 0 deletions tests/test_plot/test_yaml_errors.py
Original file line number Diff line number Diff line change
Expand Up @@ -900,3 +900,11 @@ def test_line_width_max(test_dir):
ctx.run(EXIT_BAD_CONFIG)
assert ctx.search_err(r"`line_width` outside its range ")
ctx.clean_up(keep_project=True)


@pytest.mark.indep
def test_error_empty_pth_id(test_dir):
ctx = context.TestContext(test_dir, PRJ, 'error_empty_pth_id')
ctx.run(EXIT_BAD_CONFIG)
assert ctx.search_err("Empty option .pth_id.")
ctx.clean_up(keep_project=True)
18 changes: 18 additions & 0 deletions tests/yaml_samples/error_empty_pth_id.kiplot.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
kibot:
version: 1

outputs:

- name: excellon_drill
comment: "Excellon drill files"
type: excellon
dir: Drill
options:
generate_drill_files: false
pth_and_npth_single_file: false
pth_id: @PTH_ID@
map: 'pdf'

...
definitions:
PTH_ID:

0 comments on commit fc049f5

Please sign in to comment.