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

Failing tests #29

Open
bergmannf opened this issue Dec 12, 2017 · 2 comments
Open

Failing tests #29

bergmannf opened this issue Dec 12, 2017 · 2 comments

Comments

@bergmannf
Copy link

When running the test suite I get 21 failures:

python -m test.suite

A lot of those come from TypeError: unhashable type: 'dict' in /usr/lib64/python2.7/urlparse.py:176: TypeError.

After digging into this a bit, it seems to be a problem with def _download_url_builder(binfo, bdep): in osc2/fetch.py: it returns a tuple of (downloadurl, path, {}).

This is passed into a MirrorGroup from urlgrabber, which can't handle the tuples:

test/test_fetch.py:423: in test__fetch1
    fr = fetcher._fetch(binfo, bdep)
osc2/fetch.py:469: in _fetch
    mgroup = CustomMirrorGroup(MirrorUrlOpener(bdep), mirrors=base_urls)
osc2/fetch.py:225: in __init__
    super(CustomMirrorGroup, self).__init__(*args, **kwargs)
.venv/lib/python2.7/site-packages/urlgrabber/mirror.py:275: in __init__
    self.mirrors.sort(key=estimate, reverse=True)
.venv/lib/python2.7/site-packages/urlgrabber/mirror.py:269: in estimate
    speed, fail = _TH.estimate(m['mirror'])
.venv/lib/python2.7/site-packages/urlgrabber/grabber.py:2470: in estimate
    host = urlparse.urlsplit(baseurl).netloc.split('@')[-1] or baseurl

Changing the tuples for the mirror to urls will just lead to a chain of consecutive problems, so maybe I am just running the tests wrong or my version of urlgrabber is not working with osc2?

>>> import urlgrabber
>>> urlgrabber.__version__
'3.10.2'
@marcus-h
Copy link
Member

marcus-h commented Dec 12, 2017 via email

@bergmannf
Copy link
Author

bergmannf commented Dec 12, 2017

I created a gist of the failing test cases.

I actually setup a virtualenv using the newest versions of all dependencies published to pypi.

So I guess that is where the errors come from.

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

Successfully merging a pull request may close this issue.

2 participants