hatch icon indicating copy to clipboard operation
hatch copied to clipboard

1.4.1: pytest still cannot find any units in backend/

Open kloczek opened this issue 3 years ago • 3 comments

I'm packaging your module as an rpm package so I'm using the typical PEP517 based build, install and test cycle used on building packages from non-root account.

  • cd backend; python3 -sBm build -w --no-isolation
  • because I'm calling build with --no-isolation I'm using during all processes only locally installed modules
  • install .whl file in </install/prefix>
  • run pytest with PYTHONPATH pointing to sitearch and sitelib inside </install/prefix>

Here is pytest output:

+ cd hatch-hatchling-v1.4.1
+ cd backend
+ PYTHONPATH=/home/tkloczko/rpmbuild/BUILDROOT/python-hatchling-1.4.1-2.fc35.x86_64/usr/lib64/python3.8/site-packages:/home/tkloczko/rpmbuild/BUILDROOT/python-hatchling-1.4.1-2.fc35.x86_64/usr/lib/python3.8/site-packages
+ /usr/bin/pytest -ra
=========================================================================== test session starts ============================================================================
platform linux -- Python 3.8.13, pytest-7.1.2, pluggy-1.0.0
rootdir: /home/tkloczko/rpmbuild/BUILD/hatch-hatchling-v1.4.1/backend
plugins: cov-3.0.0, mock-3.8.2
collected 0 items

========================================================================== no tests ran in 0.05s ===========================================================================

kloczek avatar Jul 08 '22 12:07 kloczek

ping ..

kloczek avatar Sep 13 '22 14:09 kloczek

This is low priority with high effort required

ofek avatar Sep 13 '22 15:09 ofek

No problem. Take your time 😋 As I don't see any other effects I've temporary disabled test suite execution in my rpm spec file assuming that it is probably more likely test suite issue than issue with tested code 😄

kloczek avatar Sep 13 '22 16:09 kloczek

It looks like tests are located in https://github.com/pypa/hatch/tree/master/tests/backend but it is unclear how to run them for hatchling sdist. Any suggestion?

mtelka avatar May 10 '23 06:05 mtelka