diff options
author | Trygve Laugstøl <trygvis@inamo.no> | 2018-08-02 21:42:01 +0200 |
---|---|---|
committer | Trygve Laugstøl <trygvis@inamo.no> | 2018-08-02 21:53:00 +0200 |
commit | e1012e314d6c21ad1b75082a292506cd751a9117 (patch) | |
tree | 4530dfff8cf7545d8395c6400fe5efc29e490c42 /test | |
parent | b6c8c2c103b98097adef2fd18547feb6fd7e1952 (diff) | |
download | ee-python-e1012e314d6c21ad1b75082a292506cd751a9117.tar.gz ee-python-e1012e314d6c21ad1b75082a292506cd751a9117.tar.bz2 ee-python-e1012e314d6c21ad1b75082a292506cd751a9117.tar.xz ee-python-e1012e314d6c21ad1b75082a292506cd751a9117.zip |
o Fixing a bad bug and learning some Python: list.insert(index, value)
will only insert at index if the list is index long. If not it will
just append them. Yay. Much better digikey part data now.
Creating a ValueList that automatically expands the list.
o Stopping with silly key and value replacements.
o Updating tests.
Diffstat (limited to 'test')
-rw-r--r-- | test/doit/test_doit.py | 20 |
1 files changed, 10 insertions, 10 deletions
diff --git a/test/doit/test_doit.py b/test/doit/test_doit.py index 6f70c6b..fc13192 100644 --- a/test/doit/test_doit.py +++ b/test/doit/test_doit.py @@ -1,21 +1,20 @@ import inspect import os -import os.path -import logging -from pathlib import Path -from ee.ds import DataSetManager +import pathlib from inspect import Parameter -import ee.kicad.doit -import ee.digikey.doit -from ee.kicad.doit import * +import ee.digikey.doit +import ee.kicad.doit from ee.digikey.doit import * +from ee.ds import DataSetManager +from ee.kicad.doit import * logger = logging.getLogger(__name__) -file_dir = Path(__file__).parent +file_dir = pathlib.Path(__file__).parent schematics_dir = file_dir / "schematics" + def exec_task(task): targets = task["targets"] for a in task["actions"]: @@ -34,7 +33,7 @@ def exec_task(task): # noinspection SpellCheckingInspection def test_doit(tmpdir, caplog): - dsm = DataSetManager(os.path.join(tmpdir, "ee")) + dsm = DataSetManager(pathlib.Path(tmpdir) / "ee") dsm.register_ds("csv", "kicad-footprint", "kicad-footprint-mapping", path=schematics_dir / "ee" / "kicad-footprint.csv") @@ -44,7 +43,7 @@ def test_doit(tmpdir, caplog): lambda ds: ds + ["kicad-footprint"]) ee.kicad.doit.init(sch=schematics_dir / "schematic-1.sch", - kicad_pcb=schematics_dir / "schematic-1.kicad_pcb",) + kicad_pcb=schematics_dir / "schematic-1.kicad_pcb", ) ee.digikey.doit.doit_config.configure(data_set_manager=dsm) @@ -52,3 +51,4 @@ def test_doit(tmpdir, caplog): exec_task(task_kicad_pcb_to_data_set()) exec_task(task_kicad_create_component_data_set()) exec_task(task_digikey_resolve_schematic_components()) + exec_task(task_digikey_fetch_full_part_facts()) |