Fixed Internal BoM separator wasn't applied when using `use_alt`

From the SchrodingersGat/KiBoM#145 PR.
This commit is contained in:
Salvador E. Tropea 2020-11-11 14:32:20 -03:00
parent 305e3251fa
commit 1248e92b95
4 changed files with 5 additions and 3 deletions

View File

@ -6,7 +6,8 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
# [Unreleased]
### Fixed
- Internal BoM separator wasn't applied when using `use_alt`
## [0.8.0] - 2020-11-06
### Added

View File

@ -198,7 +198,7 @@ class ComponentGroup(object):
for n in self.components:
P, N = (n.ref_prefix, _suffix_to_num(n.ref_suffix))
S.add(P, N)
return S.flush(' ')
return S.flush(self.cfg.ref_separator)
def update_field(self, field, value, ref=None):
""" Update a given field, concatenates existing values and informs a collision """

View File

@ -679,7 +679,7 @@ def test_int_bom_use_alt_2():
ref_column = header.index(REF_COLUMN_NAME)
qty_column = header.index(QTY_COLUMN_NAME)
# R3 without footprint won't be merged with other 10K resistors
check_kibom_test_netlist(rows, ref_column, KIBOM_TEST_GROUPS+1, KIBOM_TEST_EXCLUDE, KIBOM_TEST_COMPONENTS_ALT2)
check_kibom_test_netlist(rows, ref_column, KIBOM_TEST_GROUPS+1, KIBOM_TEST_EXCLUDE, KIBOM_TEST_COMPONENTS_ALT2, ref_sep=';')
check_dnc(rows, 'R7', ref_column, qty_column)
ctx.clean_up()

View File

@ -9,5 +9,6 @@ outputs:
dir: BoM
options:
use_alt: true
ref_separator: ;
merge_blank_fields: false