Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Tests do not work due to version conflict with mozinfo 0.6 #177

Closed
whimboo opened this issue Oct 24, 2013 · 6 comments
Closed

Tests do not work due to version conflict with mozinfo 0.6 #177

whimboo opened this issue Oct 24, 2013 · 6 comments
Milestone

Comments

@whimboo
Copy link
Contributor

whimboo commented Oct 24, 2013

When I try to run the tests for mozdownload we are failing with a version conflict for mozinfo:

Traceback (most recent call last):
File "tests/test.py", line 74, in
main()
File "tests/test.py", line 66, in main
unittest_results = test_all(manifest)
File "tests/test.py", line 41, in test_all
unittestlist.extend(get_tests(test['path']))
File "tests/test.py", line 25, in get_tests
module = imp.load_source(modname, path)
File "/mozilla/code/mozdownload/tests/base_scraper/test_base_scraper.py", line 12, in
import mozdownload
File "/mozilla/code/mozdownload/mozdownload/init.py", line 5, in
from scraper import *
File "/mozilla/code/mozdownload/mozdownload/scraper.py", line 27, in
version = pkg_resources.require("mozdownload")[0].version
File "/mozilla/code/mozdownload/tests/venv/local/lib/python2.7/site-packages/setuptools-0.6c11-py2.7.egg/pkg_resources.py", line 666, in require
File "/mozilla/code/mozdownload/tests/venv/local/lib/python2.7/site-packages/setuptools-0.6c11-py2.7.egg/pkg_resources.py", line 569, in resolve
pkg_resources.VersionConflict: (mozinfo 0.7 (/mozilla/code/mozdownload/tests/venv/lib/python2.7/site-packages), Requirement.parse('mozinfo==0.6'))

Where is 0.7 being installed? I assume there is a non-strict version dependency somewhere. Probably in mozbase?

@Nebelhom
Copy link
Collaborator

@whimboo

How odd... The only thing I could find is that moztest has mozinfo as a dependency ( https://github.com/mozilla/mozbase/blob/master/moztest/setup.py#l10 )

I assume it installs it as version 0.7...

@whimboo
Copy link
Contributor Author

whimboo commented Oct 25, 2013

Strange. I cannot find any strict dependency for all of those modules. I will check which pip install line is causing this.

@whimboo
Copy link
Contributor Author

whimboo commented Oct 25, 2013

So the problem is that we install mozinfo 0.7 via any other package in run_tests.py, because of the ´--upgrade´ option. So we might want to drop that and create the venv from fresh each time we run tests. @davehunt what do you think?

@davehunt
Copy link
Member

I'm not sure I understand what's causing the problem, could you explain in more detail, preferably with links to the source?

@whimboo
Copy link
Contributor Author

whimboo commented Oct 25, 2013

mozdownload itself requires mozinfo 0.6, and that gets chosen to be installed in run_tests.sh:
https://github.com/mozilla/mozdownload/blob/master/run_tests.sh#L25

Later in this file we install moztest via the --upgrade option. Given that it depends on mozinfo it will overwrite the current version with 0.7. Later in the test itself we are importing mozdownload. But that fails because version 0.6 is no longer installed.

@whimboo
Copy link
Contributor Author

whimboo commented Oct 25, 2013

PR has been merged.

@whimboo whimboo closed this as completed Oct 25, 2013
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants