diff --git a/tests/test_plot/test_misc.py b/tests/test_plot/test_misc.py index 29268f95..11d77a58 100644 --- a/tests/test_plot/test_misc.py +++ b/tests/test_plot/test_misc.py @@ -8,6 +8,7 @@ Tests miscellaneous stuff. - An unknown output type - -s all and_one_of_two_outs - Missing schematic +- Wrong PCB name - Missing PCB - Missing config - Wrong config name @@ -126,6 +127,15 @@ def test_miss_pcb(): ctx.clean_up() +def test_miss_pcb_2(): + ctx = context.TestContext('MissingPCB_2', '3Rs', 'pre_and_position', POS_DIR) + ctx.run(EXIT_BAD_ARGS, no_board_file=True) + + assert ctx.search_err('No PCB file found') + + ctx.clean_up() + + def test_miss_yaml(): prj = '3Rs' ctx = context.TestContext('MissingYaml', prj, 'pre_and_position', POS_DIR) diff --git a/tests/utils/context.py b/tests/utils/context.py index 7053c4ec..6e73573e 100644 --- a/tests/utils/context.py +++ b/tests/utils/context.py @@ -155,7 +155,7 @@ class TestContext(object): os.environ['COVERAGE_FILE'] = os.path.join(os.getcwd(), '.coverage') cmd.append(os.path.abspath(os.path.dirname(os.path.abspath(__file__))+'/../../src/kiplot')) cmd.append('-vv') - if not no_out_dir: + if not no_board_file: cmd = cmd+['-b', filename if filename else self.board_file] if not no_yaml_file: cmd = cmd+['-c', self.yaml_file]