aboutsummaryrefslogtreecommitdiff
path: root/test
diff options
context:
space:
mode:
authorTrygve Laugstøl <trygvis@inamo.no>2017-12-07 23:48:02 +0100
committerTrygve Laugstøl <trygvis@inamo.no>2017-12-07 23:48:02 +0100
commitefe5d835eaa26d8696c3352c4e1ed42da16fe27b (patch)
treed91a0273618e274278da77d01a20c183320f0940 /test
parent1fba999bec5a589e4785594fb1a6fbfab9129097 (diff)
downloadee-python-efe5d835eaa26d8696c3352c4e1ed42da16fe27b.tar.gz
ee-python-efe5d835eaa26d8696c3352c4e1ed42da16fe27b.tar.bz2
ee-python-efe5d835eaa26d8696c3352c4e1ed42da16fe27b.tar.xz
ee-python-efe5d835eaa26d8696c3352c4e1ed42da16fe27b.zip
wip
Diffstat (limited to 'test')
-rw-r--r--test/kicad_pcb/parser-1.kicad_pcb2
-rw-r--r--test/test_parse_pcb.py15
-rw-r--r--test/test_parse_sexpr.py (renamed from test/test_parse_kicad_pcb.py)4
3 files changed, 18 insertions, 3 deletions
diff --git a/test/kicad_pcb/parser-1.kicad_pcb b/test/kicad_pcb/parser-1.kicad_pcb
index b8efabc..9aa6ab4 100644
--- a/test/kicad_pcb/parser-1.kicad_pcb
+++ b/test/kicad_pcb/parser-1.kicad_pcb
@@ -2,7 +2,7 @@
(general
(links 5)
- (no_connects 0)
+ (no_connects 1)
(area 139.649999 101.549999 152.450001 109.270001)
(thickness 1.6)
(drawings 5)
diff --git a/test/test_parse_pcb.py b/test/test_parse_pcb.py
new file mode 100644
index 0000000..9592b92
--- /dev/null
+++ b/test/test_parse_pcb.py
@@ -0,0 +1,15 @@
+import pytest
+import os.path
+import ee.kicad.pcb
+
+basedir = os.path.dirname(os.path.abspath(__file__))
+
+def test_parsing():
+ path = os.path.join(basedir, "kicad_pcb/parser-1.kicad_pcb")
+ count = 0
+ kicad_pcb = ee.kicad.pcb.parse(path)
+ modules = kicad_pcb.modules
+ del kicad_pcb.modules
+ print(str(kicad_pcb))
+ for m in modules:
+ print(m)
diff --git a/test/test_parse_kicad_pcb.py b/test/test_parse_sexpr.py
index 25c1957..4a97507 100644
--- a/test/test_parse_kicad_pcb.py
+++ b/test/test_parse_sexpr.py
@@ -1,12 +1,12 @@
import pytest
import os.path
-from ee.kicad import parse_kicad_pcb
+import ee.kicad.sexpr as sexpr
basedir = os.path.dirname(os.path.abspath(__file__))
def test_parsing():
path = os.path.join(basedir, "kicad_pcb/parser-1.kicad_pcb")
count = 0
- for (event, token) in parse_kicad_pcb(path):
+ for (event, token) in sexpr.parse(path):
count = count + 1
assert count == 3657