django / django-box

VM to run the Django test suite. ARCHIVED Please use https://github.com/django/django-docker-box
BSD 3-Clause "New" or "Revised" License
67 stars 22 forks source link

Figure out a better way of generating runtest aliases #10

Closed jarshwah closed 6 years ago

jarshwah commented 8 years ago

As of 500668c9c70649c0bc5df364e1fdd5b7edd8b8af the ansible provisioner will now rely on tox from /django to provide virtualenvironments and requirements files for each environment. In an effort to avoid repetition I've generated each alias using nested variables: https://github.com/django/django-box/blob/500668c9c70649c0bc5df364e1fdd5b7edd8b8af/roles/python/tasks/main.yml#L62

The problem with this is that it's extremely brittle, particularly the replace() filter that removes -sqlite3 from the tox environment name if it exists. This is currently necessary because the py{2,3} environments are natively sqlite anyway. The tox file hasn't been designed with this vagrant image in mind.

I've tried to match up the database names with the aliases and settings module names with as little processing required. I don't think we can just reuse the sqlite name, because those settings already exist within the test/ directory. Perhaps the explicit PYTHONPATH will take precedence though?

jarshwah commented 8 years ago

@MarkusH if you can offer some insight when you have some time?