Pytest is not detected by sage

88 views
Skip to first unread message

Adarsh Kishore

unread,
Mar 24, 2022, 2:07:36 AM3/24/22
to sage-devel
Hi everyone,

I am running Sage v 9.6.beta4 on Ubuntu 20.04 LTS system. When I run doctests on it, it skips the doctests involving pytest, saying that
```
Pytest is not installed, skip checking tests that rely on it.
```

Screenshot from 2022-03-24 11-02-42.png
I installed pytest using
```
pip install -U pytest
```
and then
```
sudo pip install -U pytest
```

but it still does not detect pytest, as can be seen in screenshot. I also tried rebuilding sage using
```
make build
```
from SAGE_ROOT, but it does not work. I looked up these resources from Google and StackOverFlow but none of them worked out for me. I would appreciate if someone can help me in resolving this issue.

Dima Pasechnik

unread,
Mar 24, 2022, 5:41:59 AM3/24/22
to sage-devel
On Thu, Mar 24, 2022 at 6:07 AM Adarsh Kishore <adarsh.k...@gmail.com> wrote:
Hi everyone,

I am running Sage v 9.6.beta4 on Ubuntu 20.04 LTS system. When I run doctests on it, it skips the doctests involving pytest, saying that
```
Pytest is not installed, skip checking tests that rely on it.
```

Screenshot from 2022-03-24 11-02-42.png
I installed pytest using
```
pip install -U pytest
```
and then
```
sudo pip install -U pytest
```

but it still does not detect pytest, as can be seen in screenshot. I also tried rebuilding sage using
```
make build
```
from SAGE_ROOT, but it does not work.

you need Sage's pytest package, which can be installed by doing e.g. 

    make pytest


 
I looked up these resources from Google and StackOverFlow but none of them worked out for me. I would appreciate if someone can help me in resolving this issue.

--
You received this message because you are subscribed to the Google Groups "sage-devel" group.
To unsubscribe from this group and stop receiving emails from it, send an email to sage-devel+...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/sage-devel/52c4478b-215f-4b9c-aee6-4bfcd998f058n%40googlegroups.com.

François Bissey

unread,
Mar 24, 2022, 5:45:08 AM3/24/22
to sage-...@googlegroups.com
The way they want to run pytest, I would suggest to try
cd src
pytest -v
first. The configuration files for pytest are in there and it should be the reported rootdir. Not SAGE_ROOT.

Adarsh Kishore

unread,
Mar 24, 2022, 7:14:37 AM3/24/22
to sage-devel
I looked it up on the Sage developer documentation at 
https://doc.sagemath.org/html/en/developer/tools.html

The relevant command to be run is 
```
./sage -i pytest
```
from SAGE_ROOT. Running this, pytest works fine now.

Screenshot from 2022-03-24 16-01-23.png

Thanks, everyone for the help.

Dima Pasechnik

unread,
Mar 24, 2022, 7:23:19 AM3/24/22
to sage-devel
./sage -i <package>
is at the moment equivalent to 
make <package>

- but we should deprecate it.


--
You received this message because you are subscribed to the Google Groups "sage-devel" group.
To unsubscribe from this group and stop receiving emails from it, send an email to sage-devel+...@googlegroups.com.

Adarsh Kishore

unread,
Mar 24, 2022, 2:29:46 PM3/24/22
to sage-devel
ok. Thank you for the information
Reply all
Reply to author
Forward
0 new messages