Issue recording VCR tapes in Postorius.
I have started a branch to expose the pending domain.alias_domains attribute in Postorius.
I haven't yet done anything with tests, but I did the basic modifications and created <https://gitlab.com/mailman/postorius/merge_requests/186>. Of course, this merge failed CI because "create_domain() got an unexpected keyword argument 'alias_domain'".
So I need to record a new tape and modify the test. So my problem is I can't record any tapes. My "tox -e record" attempts fail with tracebacks like the attached.
It appears the virtualenv in .tox/record is a Python 3.5 virtualenv and Python 3.5 doesn't have a urllib2 module.
Why is tox creating this as a Python 3 virtualenv? All the others it creates for Postorius are Python 2.7. I've even tried "tox -e record --force-dep 'python <=2.7'" but that doesn't help.
Does anyone know what I need?
-- Mark Sapiro <mark@msapiro.net> The highway is for gamblers, San Francisco Bay Area, California better use your sense - B. Dylan
So I need to record a new tape and modify the test. So my problem is I can't record any tapes. My "tox -e record" attempts fail with tracebacks like the attached.
It appears the virtualenv in .tox/record is a Python 3.5 virtualenv and Python 3.5 doesn't have a urllib2 module.
Why is tox creating this as a Python 3 virtualenv? All the others it creates for Postorius are Python 2.7. I've even tried "tox -e record --force-dep 'python <=2.7'" but that doesn't help.
Does anyone know what I need?
You have to prefix the environment with py27. So you would be running tox -e py27-record
Since no base Python version is defined in to, it probably uses the Python version that was used to install tox itself.
You can have a look at the tox config. You could also specify the django version to be used by adding django110 to the command (the environment selectors are always separated using hyphens)
-- Sent from my Android device with K-9 Mail. Please excuse my brevity.
On 10/24/2016 03:33 PM, Simon Hanna wrote:
You have to prefix the environment with py27. So you would be running
tox -e py27-record
Since no base Python version is defined in to, it probably uses the Python version that was used to install tox itself.
Thanks Simon. That helped a lot.
However, it turns out that my underlying issue was simpler than I thought. The tests all run fine in my own development environment, but they won't run in GitLab CI because the MR depends on <https://gitlab.com/mailman/mailmanclient/merge_requests/18> which in turn depends on <https://gitlab.com/mailman/mailman/merge_requests/202>, neither of which is merged yet.
-- Mark Sapiro <mark@msapiro.net> The highway is for gamblers, San Francisco Bay Area, California better use your sense - B. Dylan
participants (2)
-
Mark Sapiro
-
Simon Hanna