[U-Boot] pytests: TypeError: 'encoding' is an invalid keyword argument for this function

Tom Rini trini at konsulko.com
Sun Oct 20 13:17:28 UTC 2019


On Sun, Oct 20, 2019 at 03:11:43PM +0200, Heinrich Schuchardt wrote:
> On 10/20/19 2:27 PM, Tom Rini wrote:
> > On Sun, Oct 20, 2019 at 08:30:44AM +0200, Heinrich Schuchardt wrote:
> > > Hello Tom,
> > > 
> > > I tested with the updated origin/WIP/Update-test.py-tests:
> > > 
> > > $ python3 ./test/py/test.py --bd=qemu-arm64 --build-dir=. -k=test_efi_
> > > INTERNALERROR> Traceback (most recent call last):
> > > INTERNALERROR>   File
> > > "/usr/lib/python2.7/dist-packages/_pytest/main.py", line 180, in
> > > wrap_session
> > 
> > Yes, as I was saying on IRC you need to remove the system python-pytest
> > and install python3-pytest or switch to a virtualenv setup with
> > python=python3 and pip install pytest there.  These, unfortunately, are
> > the ways the Python community wants to deal with packaging.
> > 
> 
> python-pytest and python3-pytest are installed in completely separate
> directories, see
> 
> https://packages.debian.org/de/sid/all/python3-pytest/filelist
> https://packages.debian.org/de/sid/all/python-pytest/filelist
> 
> python-pytest cannot be invoked by python3.
> 
> So uninstalling python-pytest cannot help to solve the issues that your
> patches cause.
> 
> You know that python on most distros will call python2. So if you want
> to call python3 do it explicitly.
> 
> virtualenv would only needed if you had different releases of python3
> packages that do not fit together.

Unfortunately it looks like calling it "py.test-3" is not a standard
feature of the pytest package and again, unfortunately it doesn't matter
what python you use to invoke "test.py" because it's just a wrapper to
the py.test app.  I found all of this out as part of the series because
test.py uses python3 not python2 and I wasn't sure why python2 was being
invoked.  It turned out to be py.test itself.  So yes, python2's pytest
package will need to be removed from the host or a virtualenv used.

-- 
Tom
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 833 bytes
Desc: not available
URL: <http://lists.denx.de/pipermail/u-boot/attachments/20191020/18492419/attachment.sig>


More information about the U-Boot mailing list