On 09/03/24 10:58, Chary Chary wrote:
Dan, thank you for your help, I just could not make the pytests work no matter what

There are errors, that that the *_parser *module cannot be imported

But I found the following workaround, which uses pip install, rather than *py setup.py build_ext -i*

No work-around is required. You are doing something wrong. However, unless you report exactly the commands you execute and the errors you get, it is impossible to know what that is.

The setup I suggest works just fine for the CI jobs and in all the systems where I tried:

$ cd /tmp
$ git clone [email protected]:beancount/beancount.git
$ python3.12 -m venv beancount/venv
$ . beancount/venv/bin/activate
$ cd beancount/
$ python -m pip install -e .
$ python -m pip install pytest
$ pytest --import-mode=importlib beancount/
...
== 1090 passed, 22 skipped, 2 xfailed, 2 warnings in 14.18s ==

I suspect you are trying to run the tests on the beancount installed in a virtual environment with the pytest executable installed for your system Python. This is not going to work.

Cheers,
Dan

--
You received this message because you are subscribed to the Google Groups 
"Beancount" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To view this discussion on the web visit 
https://groups.google.com/d/msgid/beancount/a8f06169-ee7e-4d8d-9142-0a277817deb2%40grinta.net.

Reply via email to