From mboxrd@z Thu Jan 1 00:00:00 1970 From: =?iso-8859-1?Q?Br=FCns=2C_Stefan?= Date: Mon, 17 Oct 2016 19:18:15 +0000 Subject: [U-Boot] [PATCH] test/py: Fix exception, do not parametrize with empty set In-Reply-To: <1b7d496b-5cf1-b122-44e8-f20b127053ca@wwwdotorg.org> References: <6ad787b291f34968a8580bedaa568a97@rwthex-w2-b.rwth-ad.de> <1b7d496b-5cf1-b122-44e8-f20b127053ca@wwwdotorg.org> Message-ID: <1546966.FbbolYLUvO@sbruens-linux> List-Id: MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit To: u-boot@lists.denx.de On Montag, 17. Oktober 2016 12:11:26 CEST Stephen Warren wrote: > On 10/16/2016 12:17 PM, Stefan Br?ns wrote: > > If the parameter set is empty, the pytest setup fails: > > --- > > > > call: > ['env__dfu_config'], function test_dfu at [...]test_dfu.py:107> > > > > --- > > > > This aborts pytest_runtest_makereport and later leads to an exception > > during the report generation, as the call to log.start_section(...) > > is never executed: > > --- > > > > Exception: Block nesting mismatch: > > "test_dfu[env__usb_dev_port0-env__dfu_config0]" "" > > > > --- > > How do you trigger this? I believe my test setup has many cases where > the test you added would trigger, but without the issues you mention, > but I'm not 100% sure since I don't know for sure what is causing this > issue. > > Which pytest version do you have? I appear to have 2.5.1 (on Ubuntu Trusty) 1. You need "dfu_configs" to be empty 2. Maybe its pytest version dependent, IIRC I have 3.0.2 The first error above can be seen when running pytest with "--debug", it is written to IIRC pytestdebug.log Kind regards, Stefan