From c313e6de8c06017739402ea89f55ce3b36ac0f2b Mon Sep 17 00:00:00 2001 From: Trygve Laugstøl Date: Sat, 9 Feb 2019 23:37:02 +0100 Subject: o kicad-mkdeps: new tool, new -M option for kicad-gerber. Both output a Makefile-compatible dependencies file. --- test/test_bom.py | 12 ++++-------- test/test_digikey.py | 2 +- 2 files changed, 5 insertions(+), 9 deletions(-) (limited to 'test') 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: -- cgit v1.2.3