Opened 5 years ago
Last modified 10 months ago
#21678 new enhancement
Testsuite for src/setup.py
Reported by: | mkoeppe | Owned by: | |
---|---|---|---|
Priority: | major | Milestone: | sage-wishlist |
Component: | build | Keywords: | |
Cc: | jdemeyer, embray, vbraun | Merged in: | |
Authors: | Reviewers: | ||
Report Upstream: | N/A | Work issues: | |
Branch: | Commit: | ||
Dependencies: | Stopgaps: |
Description
We should have a testsuite that tests the correct operation and interaction of various commands that a distutils-based setup.py
should support.
Does something like this exist in the Python world already?
Change History (8)
comment:1 follow-up: ↓ 2 Changed 5 years ago by
comment:2 in reply to: ↑ 1 Changed 5 years ago by
Replying to vbraun:
Not that I know of; Usually you realize pretty quickly that you can't install your project.
Any non-trivial functionality of setup.py should be implemented in the sage_setup library which can be unit tested in the usual way.
Yes, but I am thinking of higher-level tests, for example to ensure that making an sdist and then unpacking-building-cleaning succeeds and gives a tree that is the same as in the sdist archive. This is currently not tested at all and broken (#21516).
comment:3 Changed 5 years ago by
That's not a bad idea. astropy-helper has a number of functional tests to this effect: https://github.com/astropy/astropy-helpers/tree/master/astropy_helpers/tests
They're specifically geared toward testing the code in astropy-helpers itself, but this tests a lot of the other expected outputs of setup.py
in the process.
comment:4 Changed 4 years ago by
Ticket #21516 (Fix sagelib sdist) now has a test (sdistcheck) but it currently fails.
comment:5 Changed 4 years ago by
- Milestone changed from sage-7.5 to sage-8.0
comment:6 Changed 4 years ago by
Just a pointer: I implemented a pretty extensive installation test suite for cysignals
. It tests installation with --prefix
, --root
and --user
. It tests setup.py sdist
and tests distclean
.
See https://github.com/sagemath/cysignals/blob/master/Makefile#L71 and following.
comment:7 Changed 12 months ago by
- Milestone changed from sage-8.0 to sage-9.2
Moving some tickets to 9.2. This is not a promise that I will be working on them.
comment:8 Changed 10 months ago by
- Milestone changed from sage-9.2 to sage-wishlist
As of #29950, we test it with tox.
Not that I know of; Usually you realize pretty quickly that you can't install your project.
Any non-trivial functionality of setup.py should be implemented in the sage_setup library which can be unit tested in the usual way.