#19196 closed New feature (fixed)
Add tests/requirements.txt
Reported by: | Anssi Kääriäinen | Owned by: | nobody |
---|---|---|---|
Component: | Documentation | Version: | dev |
Severity: | Normal | Keywords: | |
Cc: | timograham@… | Triage Stage: | Ready for checkin |
Has patch: | yes | Needs documentation: | no |
Needs tests: | no | Patch needs improvement: | no |
Easy pickings: | no | UI/UX: | no |
Description
Adding testing requirements will make it easier to run all Django's tests. A first draft version available here: https://github.com/akaariai/django/compare/add_test_requirements
I have commented out those packages which either do not have py3 support or which require compiling. We might want to add all packages uncommented and let testers comment them out if they can't install some of the packages.
The list is based on http://apolloner.eu/~apollo13/django/before_script.sh
As said, this is just first draft. Some packages might be missing. The requires compiling/no py3 support comments might be inaccurate, too.
Change History (19)
comment:1 by , 12 years ago
Triage Stage: | Unreviewed → Accepted |
---|
comment:2 by , 12 years ago
Cc: | added |
---|
comment:3 by , 12 years ago
Some other things that could be mentioned here include python-memcached
/pylibmc
(also requires configuration in settings.CACHES
to run memcached tests) and coverage
(if you want to generate test coverage data).
One way to handle the compiled/non and py2/py3 differences would be with multiple requirements files; requirements files can also include each other with a -r
line, so we could provide a requirements/all.txt
that includes everything. Of course the downside here is that if we split along more than one axis, the number of requirements files can get silly...
comment:4 by , 12 years ago
Also, in the draft patch I don't quite understand "Note that in some cases installing a package will activate an alternate set of tests. These packages are: pytz, enter more here." I think every requirement in this file (except the database adapters) will automatically enable some additional (not alternate) tests in the test suite, so I'm not sure why pytz is specifically called out. And I can't find any tests that are _disabled_ by installing pytz, so I don't think the word "alternate" is correct.
comment:5 by , 12 years ago
Component: | Uncategorized → Documentation |
---|---|
Type: | Uncategorized → New feature |
comment:6 by , 12 years ago
Patch needs improvement: | set |
---|
comment:7 by , 12 years ago
We also need bcrypt instead of py-bcrypt for Django 1.6+ due to 8f0a4665d67868dce2e204dd592b0f133edf7943.
comment:8 by , 12 years ago
There's also the list that the djangocore-box uses below. I was going to send a pull request there to add bcrypt, but I thought it may be more productive to try to complete this ticket and that modify djangocore-box to use Django's included requirements. Any thoughts on how we can move forward with this?
https://github.com/jphalip/djangocore-box/tree/master/requirements
comment:9 by , 11 years ago
Patch needs improvement: | unset |
---|
Here's my proposal: https://github.com/timgraham/django/commit/ac14164267829091f2af705a42580da7dc3b8d80
Would this breakdown be sufficient for use on Jenkins? I can work on versions for 1.5/1.4 if this looks good.
comment:10 by , 11 years ago
feedback from apollo13 in IRC: I am not sure if it's worth to add requirements-database.txt -- or at least structure it under an requirements directory.
Using a directory makes sense to me. My thought regarding the individual database requirements files is that it would allow automated installation of selected databases in environments such as the djangocore-box, which doesn't have Oracle support as of now.
comment:12 by , 11 years ago
Triage Stage: | Accepted → Ready for checkin |
---|
Looks good to me; I've tried the various requirements files in a fresh virtualenv.
Optionally for GeoDjango we could have a paragraph in internals/contributing/writing-code/unit-tests.txt
that links to https://docs.djangoproject.com/en/dev/ref/contrib/gis/install/.
comment:13 by , 11 years ago
Resolution: | → fixed |
---|---|
Status: | new → closed |
Might be nice if we could refer to this in the contributing tutorial (#16779).