From 1f7cff4fe81ee29409bde9b2d0b0488014df2f7f Mon Sep 17 00:00:00 2001 From: "Salvador E. Tropea" Date: Fri, 23 Sep 2022 08:41:31 -0300 Subject: [PATCH] [Tests] Delay the get_path patch, needed by Python 3.10 --- tests/test_plot/kiconf_init.py | 15 ++++++++------- 1 file changed, 8 insertions(+), 7 deletions(-) diff --git a/tests/test_plot/kiconf_init.py b/tests/test_plot/kiconf_init.py index bbc50f9b..e108e1bd 100755 --- a/tests/test_plot/kiconf_init.py +++ b/tests/test_plot/kiconf_init.py @@ -64,14 +64,15 @@ GS.kicad_conf_path = None if args.no_conf_path else ki_path def do_init(): - with context.cover_it(cov): - KiConf.init(os.path.join(context.BOARDS_DIR, 'v5_errors/kibom-test.sch')) - # Check we can call it again and nothing is done - KiConf.init('bogus') + KiConf.init(os.path.join(context.BOARDS_DIR, 'v5_errors/kibom-test.sch')) + # Check we can call it again and nothing is done + KiConf.init('bogus') if args.patch_get_path: - with patch("sysconfig.get_path", lambda a, b: ''): - do_init() + with context.cover_it(cov): + with patch("sysconfig.get_path", lambda a, b=None: ''): + do_init() else: - do_init() + with context.cover_it(cov): + do_init()