From mboxrd@z Thu Jan 1 00:00:00 1970 From: Tom Rini Date: Sat, 30 Jan 2021 14:21:57 -0500 Subject: [PATCH] test: correct entry point to pytest In-Reply-To: <20210128114611.128865-1-xypron.glpk@gmx.de> References: <20210128114611.128865-1-xypron.glpk@gmx.de> Message-ID: <20210130192157.GS7530@bill-the-cat> List-Id: MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit To: u-boot@lists.denx.de On Thu, Jan 28, 2021 at 12:46:11PM +0100, Heinrich Schuchardt wrote: > With Pytest 6.0.2 'make tests' fails: > > sandbox: Traceback (most recent call last): > File "./test/py/test.py", line 20, in > sys.exit(load_entry_point('pytest', 'console_scripts', 'pytest')(args)) > TypeError: console_main() takes 0 positional arguments but 1 was given > > The definition of console_scripts has changed as follows: > > Pytest 4.6.1: > > [options.entry_points] > console_scripts = > ????????pytest=pytest:main > ????????py.test=pytest:main > ???????? > Pytest 6.0.2: > ???????? > [options.entry_points] > console_scripts = > pytest=pytest:console_main > py.test=pytest:console_main > > The new function console_main() has a comment: > "This function is not meant for programmable use; use `main()`" > > Hence let's call pytest.main() directly. > Move args processing into the __main__ paragraph. > > Signed-off-by: Heinrich Schuchardt > Tested-by: Andy Shevchenko > Tested-by: Tom Rini Applied to u-boot/master, thanks! -- Tom -------------- next part -------------- A non-text attachment was scrubbed... Name: signature.asc Type: application/pgp-signature Size: 659 bytes Desc: not available URL: