From 1b2616b19f8103bbca223fc0646c8e284b7b85b5 Mon Sep 17 00:00:00 2001 From: "Salvador E. Tropea" Date: Fri, 10 Jun 2022 12:46:59 -0300 Subject: [PATCH] Added simnple test for Specs (XLSX BoM) --- tests/reference/5_1_6/KiCost/kibom-variant_2c-bom_spec.csv | 2 ++ .../reference/5_1_6/KiCost/kibom-variant_2c-bom_spec_dnf.csv | 2 ++ tests/test_plot/test_kicost.py | 4 ++++ tests/yaml_samples/int_bom_kicost_simple_xlsx.kibot.yaml | 1 + 4 files changed, 9 insertions(+) create mode 100644 tests/reference/5_1_6/KiCost/kibom-variant_2c-bom_spec.csv create mode 100644 tests/reference/5_1_6/KiCost/kibom-variant_2c-bom_spec_dnf.csv diff --git a/tests/reference/5_1_6/KiCost/kibom-variant_2c-bom_spec.csv b/tests/reference/5_1_6/KiCost/kibom-variant_2c-bom_spec.csv new file mode 100644 index 00000000..c624c067 --- /dev/null +++ b/tests/reference/5_1_6/KiCost/kibom-variant_2c-bom_spec.csv @@ -0,0 +1,2 @@ +References,case_package,case_package_si,packaging,pin_count,power_rating,reach_svhc_compliance,resistance,resistance_tolerance,rohs_status,size_length,size_thickness,size_width,temperature_coefficient,voltage_rating_dc +R1 R2,0603,1608,"Cut Tape (CT), Tape & Reel (TR)",2,100 mW,No SVHC,1.00 kΩ,±5%,Compliant,1.60 mm,457 µm,787 µm,-200 ppm/°C to 200 ppm/°C,50.0 V diff --git a/tests/reference/5_1_6/KiCost/kibom-variant_2c-bom_spec_dnf.csv b/tests/reference/5_1_6/KiCost/kibom-variant_2c-bom_spec_dnf.csv new file mode 100644 index 00000000..b1f2aad3 --- /dev/null +++ b/tests/reference/5_1_6/KiCost/kibom-variant_2c-bom_spec_dnf.csv @@ -0,0 +1,2 @@ +References,capacitance,capacitance_tolerance,case_package,dielectric_characteristic,lead_free_status,mounting_style,operating_temperature,rohs_status,voltage_rating_dc +C1 C2,1.00 nF,±10%,0603,X7R,Lead Free,Surface Mount,-55.0 °C (min),Compliant,100 V diff --git a/tests/test_plot/test_kicost.py b/tests/test_plot/test_kicost.py index 393c6697..b938cbd7 100644 --- a/tests/test_plot/test_kicost.py +++ b/tests/test_plot/test_kicost.py @@ -88,6 +88,10 @@ def test_kicost_bom_simple(test_dir): ctx.compare_txt(csv) convert2csv(ctx.get_out_path(output), sheet='Costs (DNF)') ctx.compare_txt(csv, output[:-5]+'_dnf.csv') + convert2csv(ctx.get_out_path(output), sheet='Specs') + ctx.compare_txt(csv, output[:-5]+'_spec.csv') + convert2csv(ctx.get_out_path(output), sheet='Specs (DNF)') + ctx.compare_txt(csv, output[:-5]+'_spec_dnf.csv') ctx.clean_up() diff --git a/tests/yaml_samples/int_bom_kicost_simple_xlsx.kibot.yaml b/tests/yaml_samples/int_bom_kicost_simple_xlsx.kibot.yaml index 31b2ef98..8fb79326 100644 --- a/tests/yaml_samples/int_bom_kicost_simple_xlsx.kibot.yaml +++ b/tests/yaml_samples/int_bom_kicost_simple_xlsx.kibot.yaml @@ -37,4 +37,5 @@ outputs: xlsx: kicost: true kicost_config: tests/data/kicost_default_config.yaml + specs: true extra_info: ['%f', ' %d']