From 0ed23a16425c969abd2c4bd1f4d71521a8a53e0f Mon Sep 17 00:00:00 2001 From: "Salvador E. Tropea" Date: Mon, 25 May 2020 20:12:42 -0300 Subject: [PATCH] Added a test to skip one output --- tests/test_plot/test_misc.py | 14 ++++++++++++++ tests/yaml_samples/pre_and_position.kiplot.yaml | 12 +++++++++++- 2 files changed, 25 insertions(+), 1 deletion(-) diff --git a/tests/test_plot/test_misc.py b/tests/test_plot/test_misc.py index 32233b1e..5702807b 100644 --- a/tests/test_plot/test_misc.py +++ b/tests/test_plot/test_misc.py @@ -5,6 +5,8 @@ Tests miscellaneous stuff. - -s run_erc,update_xml,run_drc -i - -s all,run_drc - -s bogus +- An unknown output type +- -s all and_one_of_two_outs For debug information use: pytest-3 --log-cli-level debug @@ -81,3 +83,15 @@ def test_unknown_out(): assert ctx.search_err("Unknown output type 'bogus'") ctx.clean_up() + + +def test_select_output(): + prj = '3Rs' + ctx = context.TestContext('DoASCIISkipCSV', prj, 'pre_and_position', POS_DIR) + ctx.run(extra=['-s', 'all', 'pos_ascii']) + + ctx.dont_expect_out_file(ctx.get_pos_both_csv_filename()) + ctx.expect_out_file(ctx.get_pos_both_filename()) + assert ctx.search_err('Skipping position output') + + ctx.clean_up() diff --git a/tests/yaml_samples/pre_and_position.kiplot.yaml b/tests/yaml_samples/pre_and_position.kiplot.yaml index 5d17518e..882a8d72 100644 --- a/tests/yaml_samples/pre_and_position.kiplot.yaml +++ b/tests/yaml_samples/pre_and_position.kiplot.yaml @@ -18,4 +18,14 @@ outputs: format: CSV # CSV or ASCII format units: millimeters # millimeters or inches separate_files_for_front_and_back: false - only_smd: true \ No newline at end of file + only_smd: true + + - name: 'pos_ascii' + comment: "Pick and place file" + type: position + dir: positiondir + options: + format: ASCII # CSV or ASCII format + units: millimeters # millimeters or inches + separate_files_for_front_and_back: false + only_smd: true