diff options
author | Trygve Laugstøl <trygvis@inamo.no> | 2019-06-14 10:40:31 +0200 |
---|---|---|
committer | Trygve Laugstøl <trygvis@inamo.no> | 2019-06-14 10:40:31 +0200 |
commit | 89197dad4f5f427faa7fba12971b20037ad5ba71 (patch) | |
tree | 0124db8c8eec7f70b7169c2aa2fd67bc6c1adeb8 /test | |
parent | d203763f31428bee3edba4383d37f992b0f8e186 (diff) | |
download | ee-python-89197dad4f5f427faa7fba12971b20037ad5ba71.tar.gz ee-python-89197dad4f5f427faa7fba12971b20037ad5ba71.tar.bz2 ee-python-89197dad4f5f427faa7fba12971b20037ad5ba71.tar.xz ee-python-89197dad4f5f427faa7fba12971b20037ad5ba71.zip |
split-parts-by-supplier: rename to split-bom-by-supplier.
digikey-create-bom: Implementing CSV generation for Digi-Key.
Diffstat (limited to 'test')
-rw-r--r-- | test/part/test_bom.py | 12 | ||||
-rw-r--r-- | test/test_digikey.py | 2 | ||||
-rw-r--r-- | test/test_kicad_bom.py (renamed from test/test_bom.py) | 0 |
3 files changed, 13 insertions, 1 deletions
diff --git a/test/part/test_bom.py b/test/part/test_bom.py new file mode 100644 index 0000000..85eb932 --- /dev/null +++ b/test/part/test_bom.py @@ -0,0 +1,12 @@ +import pytest +from ee.part.bom import join_refs + + +@pytest.mark.parametrize("inputs, output", [ + [[], ""], + [["C1"], "C1"], + [["C1", "C2"], "C1,2"], + [["C1", "C2", "C3", "C5", "C6", "C9"], "C1-3,5,6,9"], +]) +def test_basic(inputs, output): + assert output == join_refs(inputs) diff --git a/test/test_digikey.py b/test/test_digikey.py index f1b010b..4961a9d 100644 --- a/test/test_digikey.py +++ b/test/test_digikey.py @@ -83,7 +83,7 @@ def test_digikey_3(): p = next((p for p in res.products if p.part_number == "1655-1501-1-ND"), None) assert p.mpn == "RS1MTR" - assert p.url == "/product-detail/en/smc-diode-solutions/RS1MTR/1655-1501-1-ND/6022946" + assert p.url == "https://www.digikey.com/product-detail/en/smc-diode-solutions/RS1MTR/1655-1501-1-ND/6022946" @pytest.mark.digikey diff --git a/test/test_bom.py b/test/test_kicad_bom.py index 50cae9f..50cae9f 100644 --- a/test/test_bom.py +++ b/test/test_kicad_bom.py |