diff options
Diffstat (limited to 'test')
-rw-r--r-- | test/test_bom.py | 12 | ||||
-rw-r--r-- | test/test_digikey.py | 2 |
2 files changed, 5 insertions, 9 deletions
diff --git a/test/test_bom.py b/test/test_bom.py index fd8c6c6..50cae9f 100644 --- a/test/test_bom.py +++ b/test/test_bom.py @@ -37,11 +37,10 @@ def test_read_bom_2(): assert len(r5.fields) == 4 assert r5.fields["Part Number"] == "CRCW0402100RFKED" assert r5["Part Number"] == "CRCW0402100RFKED" - assert set( - ['ref', 'value', 'Capacitance', 'Color', 'Description', 'Frequency', 'Impedance', 'Inductance', 'Manufacturer', - 'Part Number', 'Resistance']) == bom.all_field_names() + assert {'ref', 'value', 'Capacitance', 'Color', 'Description', 'Frequency', 'Impedance', 'Inductance', + 'Manufacturer', 'Part Number', 'Resistance'} == bom.all_field_names() - assert not "foo" in r5 + assert "foo" not in r5 with pytest.raises(KeyError): r5["foo"] @@ -50,10 +49,7 @@ def test_read_bom_2_pandas(): bom = read_bom(basedir + '/../demo/kicad/bom/gw.xml').to_pandas() assert len(bom) == 165 - print("bom") - print(str(bom)) r5 = bom.loc["R5"] - print(str(r5.index)) # assert r5.index == "R5" assert r5["ref"] == "R5" assert r5["value"] == "R0402_100R" @@ -65,6 +61,6 @@ def test_read_bom_2_pandas(): assert r5["Part Number"] == "CRCW0402100RFKED" # assert set(['ref', 'value', 'Capacitance', 'Color', 'Description', 'Frequency', 'Impedance', 'Inductance', 'Manufacturer', 'Part Number', 'Resistance']) == bom.all_field_names() - assert not "foo" in r5 + assert "foo" not in r5 with pytest.raises(KeyError): r5["foo"] diff --git a/test/test_digikey.py b/test/test_digikey.py index 2b3cd12..97cd943 100644 --- a/test/test_digikey.py +++ b/test/test_digikey.py @@ -4,7 +4,6 @@ from pathlib import Path import pytest from selenium import webdriver -from selenium.webdriver.common.keys import Keys import ee.digikey as dk @@ -110,6 +109,7 @@ def cache_file(url, keyword): return content + try: driver.close() except Exception: |