From f1c868b732126576368c386844ac9022a8dbe40f Mon Sep 17 00:00:00 2001 From: "Salvador E. Tropea" Date: Tue, 29 Dec 2020 09:01:58 -0300 Subject: [PATCH] Added support for the last InteractiveHtmlBom to the tests. Now the PCB modules are located in the footprints section of the generated data. This change is a general move from the module term to a more descriptive term `footprint`. --- tests/test_plot/test_ibom.py | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/tests/test_plot/test_ibom.py b/tests/test_plot/test_ibom.py index 192a1ac6..1bc4992c 100644 --- a/tests/test_plot/test_ibom.py +++ b/tests/test_plot/test_ibom.py @@ -38,9 +38,12 @@ def check_modules(ctx, fname, expected): assert m, text lz = LZString() js = lz.decompressFromBase64(m.group(1)) + # with open('/tmp/dump', 'wt') as f: + # f.write(js) data = json.loads(js) skipped = data['bom']['skipped'] - modules = [m['ref'] for m in data['modules']] + footprints_name = 'modules' if 'modules' in data else 'footprints' + modules = [m['ref'] for m in data[footprints_name]] assert len(modules)-len(skipped) == len(expected) logging.debug("{} components OK".format(len(expected))) for m in expected: