From dce92efdbc3f689197c6d46ff3f37cecb7c81a40 Mon Sep 17 00:00:00 2001 From: Trygve Laugstøl Date: Tue, 12 Dec 2017 13:00:00 +0100 Subject: o Adding a test for kicad-make-pos. --- test/tool/test_kicad_make_pos.py | 27 +++++++++++++++++++++++++++ 1 file changed, 27 insertions(+) create mode 100644 test/tool/test_kicad_make_pos.py (limited to 'test/tool') diff --git a/test/tool/test_kicad_make_pos.py b/test/tool/test_kicad_make_pos.py new file mode 100644 index 0000000..447b497 --- /dev/null +++ b/test/tool/test_kicad_make_pos.py @@ -0,0 +1,27 @@ +import utils +import argparse +import os.path +from io import StringIO + +basedir = os.path.dirname(os.path.abspath(__file__)) + +def test_basic(): + argv = [ + "ee", + "--kicad-pcb", + os.path.join(basedir, "../kicad_pcb/parser-1.kicad_pcb") + ] + buf = StringIO() + try: + with utils.make_env(argv=argv, stdout=buf): + import ee.tools.kicad_make_pos + except SystemExit as e: + raise e + finally: + print("Output") + buf.seek(0) + count = 0 + for l in buf.readlines(): + print(l.rstrip()) + count = count + 1 + assert count > 3 -- cgit v1.2.3