diff --git a/pytest.ini b/pytest.ini index 6423a6c4..dd02f255 100644 --- a/pytest.ini +++ b/pytest.ini @@ -3,3 +3,6 @@ python_files = tests/test_plot/test_*.py markers = webtest: mark a test as a webtest. slow: mark test as slow. + kicad2step: uses kicad2step tool + eeschema: uses eeschema tool + pcbnew: uses pcbnew tool diff --git a/tests/test_plot/test_misc.py b/tests/test_plot/test_misc.py index 9d5e9f43..d9ceb3bb 100644 --- a/tests/test_plot/test_misc.py +++ b/tests/test_plot/test_misc.py @@ -744,6 +744,7 @@ def check_makefile(ctx, mkfile, prj, dbg, txt): @pytest.mark.slow +@pytest.mark.kicad2step def test_makefile_1(test_dir): prj = 'test_v5' ctx = context.TestContext(test_dir, prj, 'makefile_1') @@ -755,6 +756,7 @@ def test_makefile_1(test_dir): @pytest.mark.slow +@pytest.mark.kicad2step def test_makefile_2(test_dir): prj = 'test_v5' ctx = context.TestContext(test_dir, prj, 'makefile_1') @@ -939,6 +941,7 @@ def test_cli_order(test_dir): @pytest.mark.slow +@pytest.mark.eeschema def test_qr_lib_1(test_dir): prj = 'qr_test/qr_test' ctx = context.TestContext(test_dir, prj, 'qr_lib_1', POS_DIR) @@ -1001,6 +1004,7 @@ def test_report_simple_1(test_dir): @pytest.mark.slow +@pytest.mark.eeschema def test_report_simple_2(test_dir): prj = 'light_control' ctx = context.TestContext(test_dir, prj, 'report_simple_2', POS_DIR) @@ -1160,6 +1164,7 @@ def test_annotate_pcb_tbrl_small_grid(test_dir): @pytest.mark.slow +@pytest.mark.pcbnew def test_gencad_1(test_dir): prj = 'gencad' ctx = context.TestContext(test_dir, prj, 'gencad_1') @@ -1177,6 +1182,7 @@ def test_gencad_1(test_dir): @pytest.mark.slow +@pytest.mark.pcbnew def test_quick_start_1(test_dir): """ Very naive test to see if it doesn't crash """ prj = 'light_control' @@ -1217,6 +1223,7 @@ def test_quick_start_1(test_dir): @pytest.mark.slow +@pytest.mark.eeschema def test_netlist_classic_1(test_dir): prj = 'light_control' dir_o = 'Export' @@ -1226,6 +1233,7 @@ def test_netlist_classic_1(test_dir): @pytest.mark.slow +@pytest.mark.pcbnew def test_netlist_ipc_1(test_dir): prj = 'light_control' dir_o = 'Export' diff --git a/tests/test_plot/test_preflight.py b/tests/test_plot/test_preflight.py index caae208a..4c2492a8 100644 --- a/tests/test_plot/test_preflight.py +++ b/tests/test_plot/test_preflight.py @@ -24,6 +24,7 @@ from kibot.misc import DRC_ERROR, ERC_ERROR, BOM_ERROR, CORRUPTED_PCB, CORRUPTED @pytest.mark.slow +@pytest.mark.eeschema def test_erc_1(test_dir): prj = 'bom' ctx = context.TestContext(test_dir, prj, 'erc', '') @@ -34,6 +35,7 @@ def test_erc_1(test_dir): @pytest.mark.slow +@pytest.mark.eeschema def test_erc_fail_1(test_dir): """ Using an SCH with ERC errors """ prj = 'fail-erc' @@ -53,6 +55,7 @@ def test_erc_fail_2(test_dir): @pytest.mark.slow +@pytest.mark.eeschema def test_erc_warning_1(test_dir): """ Using an SCH with ERC warnings """ prj = 'warning-project' @@ -65,6 +68,7 @@ def test_erc_warning_1(test_dir): @pytest.mark.slow +@pytest.mark.eeschema def test_erc_warning_2(test_dir): """ Using an SCH with ERC warnings as errors """ prj = 'warning-project' @@ -136,6 +140,7 @@ def test_drc_time_out(test_dir): @pytest.mark.slow +@pytest.mark.eeschema def test_update_xml_1(test_dir): prj = 'bom' ctx = context.TestContext(test_dir, prj, 'update_xml', '') @@ -156,6 +161,7 @@ def test_update_xml_1(test_dir): @pytest.mark.slow +@pytest.mark.eeschema def test_update_xml_fail(test_dir): """ Using a dummy SCH """ prj = '3Rs' diff --git a/tests/test_plot/test_print_pcb.py b/tests/test_plot/test_print_pcb.py index 6ee54cad..d6f75d24 100644 --- a/tests/test_plot/test_print_pcb.py +++ b/tests/test_plot/test_print_pcb.py @@ -18,6 +18,7 @@ PDF_FILE_C = 'PCB_Bot_def.pdf' @pytest.mark.slow +@pytest.mark.pcbnew def test_print_pcb_simple(test_dir): prj = 'bom' ctx = context.TestContext(test_dir, prj, 'print_pcb', PDF_DIR) @@ -28,6 +29,7 @@ def test_print_pcb_simple(test_dir): @pytest.mark.slow +@pytest.mark.pcbnew def test_print_pcb_svg_simple_1(test_dir): prj = 'bom' ctx = context.TestContext(test_dir, prj, 'print_pcb_svg') @@ -40,6 +42,7 @@ def test_print_pcb_svg_simple_1(test_dir): @pytest.mark.slow +@pytest.mark.pcbnew def test_print_pcb_svg_simple_2(test_dir): """ Check the portrait version is OK """ prj = 'bom_portrait' @@ -53,6 +56,7 @@ def test_print_pcb_svg_simple_2(test_dir): @pytest.mark.slow +@pytest.mark.pcbnew def test_print_pcb_refill_1(test_dir): prj = 'zone-refill' ctx = context.TestContext(test_dir, prj, 'print_pcb_zone-refill') @@ -63,6 +67,7 @@ def test_print_pcb_refill_1(test_dir): @pytest.mark.slow +@pytest.mark.pcbnew def test_print_pcb_refill_2(test_dir): """ Using KiCad 6 colors """ if context.ki5(): @@ -76,6 +81,7 @@ def test_print_pcb_refill_2(test_dir): @pytest.mark.slow +@pytest.mark.pcbnew def test_print_variant_1(test_dir): prj = 'kibom-variant_3_txt' ctx = context.TestContext(test_dir, prj, 'print_pcb_variant_1') @@ -89,6 +95,7 @@ def test_print_variant_1(test_dir): @pytest.mark.slow +@pytest.mark.pcbnew def test_print_pcb_options(test_dir): prj = 'bom' ctx = context.TestContext(test_dir, prj, 'print_pcb_options', PDF_DIR) @@ -100,6 +107,7 @@ def test_print_pcb_options(test_dir): @pytest.mark.slow +@pytest.mark.pcbnew def test_print_wrong_paste(test_dir): prj = 'wrong_paste' ctx = context.TestContext(test_dir, prj, 'wrong_paste', PDF_DIR) @@ -111,6 +119,7 @@ def test_print_wrong_paste(test_dir): @pytest.mark.slow +@pytest.mark.pcbnew def test_pcb_print_simple_1(test_dir): prj = 'light_control' ctx = context.TestContext(test_dir, prj, 'pcb_print_2') diff --git a/tests/test_plot/test_print_sch.py b/tests/test_plot/test_print_sch.py index c8a98476..c4de33d4 100644 --- a/tests/test_plot/test_print_sch.py +++ b/tests/test_plot/test_print_sch.py @@ -27,6 +27,7 @@ cov = coverage.Coverage() @pytest.mark.slow +@pytest.mark.eeschema def test_print_sch_ok(test_dir): prj = 'bom_no_xml' # bom has meta data, here we test no meta-data ctx = context.TestContext(test_dir, prj, 'print_sch') @@ -37,6 +38,7 @@ def test_print_sch_ok(test_dir): @pytest.mark.slow +@pytest.mark.eeschema def test_print_sch_fail(test_dir): prj = 'print_err' ctx = context.TestContextSCH(test_dir, prj, 'print_sch') @@ -46,6 +48,7 @@ def test_print_sch_fail(test_dir): @pytest.mark.slow +@pytest.mark.eeschema def test_print_sch_svg_ok(test_dir): prj = 'bom_no_xml' # bom has meta data, here we test no meta-data ctx = context.TestContext(test_dir, prj, 'print_sch_svg') @@ -56,6 +59,7 @@ def test_print_sch_svg_ok(test_dir): @pytest.mark.slow +@pytest.mark.eeschema def test_print_sch_svg_fail(test_dir): prj = 'print_err' ctx = context.TestContext(test_dir, prj, 'print_sch_svg') @@ -103,6 +107,7 @@ def test_sch_variant_ni_2(test_dir): @pytest.mark.slow +@pytest.mark.eeschema def test_print_sch_variant_ni_1(test_dir): """ Using a variant """ prj = 'test_v5_wks' # Is the most complete, contains every KiCad object I know @@ -116,6 +121,7 @@ def test_print_sch_variant_ni_1(test_dir): @pytest.mark.slow +@pytest.mark.eeschema def test_print_sch_svg_variant_ni_1(test_dir): """ SVG using a variant """ prj = 'test_v5' # Is the most complete, contains every KiCad object I know @@ -129,6 +135,7 @@ def test_print_sch_svg_variant_ni_1(test_dir): @pytest.mark.slow +@pytest.mark.eeschema def test_print_sch_variant_ni_2(test_dir): """ Using a filter """ prj = 'test_v5' # Is the most complete, contains every KiCad object I know diff --git a/tests/test_plot/test_step.py b/tests/test_plot/test_step.py index 537a22d8..61e4034a 100644 --- a/tests/test_plot/test_step.py +++ b/tests/test_plot/test_step.py @@ -19,6 +19,7 @@ STEP_DIR = '3D' @pytest.mark.slow +@pytest.mark.kicad2step def test_step_1(test_dir): prj = 'bom' ctx = context.TestContext(test_dir, prj, 'step_simple', STEP_DIR) @@ -34,6 +35,7 @@ def test_step_1(test_dir): @pytest.mark.slow +@pytest.mark.kicad2step def test_step_2(test_dir): prj = 'bom_fake_models' yaml = 'step_simple_2' @@ -48,6 +50,7 @@ def test_step_2(test_dir): @pytest.mark.slow +@pytest.mark.kicad2step def test_step_3(test_dir): prj = 'bom' ctx = context.TestContext(test_dir, prj, 'step_simple_3', STEP_DIR) @@ -58,6 +61,7 @@ def test_step_3(test_dir): @pytest.mark.slow +@pytest.mark.kicad2step def test_step_gl_env(test_dir): prj = 'bom' ctx = context.TestContext(test_dir, prj, 'step_gl_env', STEP_DIR) @@ -73,6 +77,7 @@ def test_step_gl_env(test_dir): @pytest.mark.slow +@pytest.mark.kicad2step def test_step_variant_1(test_dir): prj = 'kibom-variant_3' ctx = context.TestContext(test_dir, prj, 'step_variant_1') @@ -85,6 +90,7 @@ def test_step_variant_1(test_dir): @pytest.mark.slow +@pytest.mark.pcbnew def test_render_3d_variant_1(test_dir): # Text variables to ensure they are rendered. # Traces