jhrmnn / pyberny

Molecular structure optimizer
Mozilla Public License 2.0
110 stars 21 forks source link

Please add to README how to run tests #36

Closed yurivict closed 2 years ago

yurivict commented 2 years ago

pytest -rs --pyargs berny fails to find any tests.

jhrmnn commented 2 years ago

Not sure why you expect tests should be run in this way. They can be run with simple pytest. I don't think that needs to be documented.

yurivict commented 2 years ago

pytest prints:

==================================================================================== test session starts ====================================================================================
platform freebsd13 -- Python 3.8.12, pytest-4.6.11, py-1.9.0, pluggy-0.13.1
rootdir: /disk-samsung/freebsd-ports/science/py-pyberny/work-py38/pyberny-0.6.3
plugins: forked-1.0.2, cov-2.9.0, hypothesis-6.23.0, rerunfailures-10.1, timeout-1.4.2, xdist-1.32.0, mock-1.10.4
collected 0 items                                                                                                                                                                           

=============================================================================== no tests ran in 0.04 seconds ================================================================================
jhrmnn commented 2 years ago

This is not expected behavior. Do you run pytest in the root directory of the repository? Then Pytest should discover the tests in the tests directory.

jhrmnn commented 2 years ago

Were you able to run the tests?

jhrmnn commented 2 years ago

Closed for inactivity. Feel free to reopen.

yurivict commented 2 years ago

The tarball downloaded from PyPI doesn't contain the tests subdirectory.

jhrmnn commented 2 years ago

The source distribution indeed doesn't contain the tests. The tests are intended for developers, not for end users, and can be found only in the Git repository.