I'm packaging this for openSUSE, and ran into these two errors only on openSUSE Leap 42.3 's Python 2.7, which is 2.7.13 .. it looks like it might even be that the Python hashlib is giving uppercase.
[ 40s] _______________________ test_lockfile_from_pipfile_meta ________________________
[ 40s]
[ 40s] def test_lockfile_from_pipfile_meta():
[ 40s] pipfile = Pipfile({
[ 40s] "source": [
[ 40s] {
[ 40s] "name": "pypi",
[ 40s] "url": "https://pypi.org/simple",
[ 40s] "verify_ssl": True,
[ 40s] },
[ 40s] ],
[ 40s] "requires": {
[ 40s] "python_version": "3.7",
[ 40s] }
[ 40s] })
[ 40s] pipfile_hash_value = pipfile.get_hash().value
[ 40s] lockfile = Lockfile.with_meta_from(pipfile)
[ 40s]
[ 40s] pipfile.requires._data["python_version"] = "3.8"
[ 40s] pipfile.sources.append({
[ 40s] "name": "devpi",
[ 40s] "url": "http://localhost/simple",
[ 40s] "verify_ssl": True,
[ 40s] })
[ 40s]
[ 40s] > assert lockfile.meta.hash._data == {"sha256": pipfile_hash_value}
[ 40s] E AssertionError: assert {'SHA256': '7...baa518a65489'} == {'sha256': '7e...baa518a65489'}
[ 40s] E Left contains more items:
[ 40s] E {u'SHA256': '7e7ef69da7248742e869378f8421880cf8f0017f96d94d086813baa518a65489'}
[ 40s] E Right contains more items:
[ 40s] E {u'sha256': '7e7ef69da7248742e869378f8421880cf8f0017f96d94d086813baa518a65489'}
[ 40s] E Use -v to get the full diff
[ 40s]
[ 40s] tests/test_lockfiles.py:114: AssertionError
[ 40s] _____________________________ test_hash_from_hash ______________________________
[ 40s]
[ 40s] def test_hash_from_hash():
[ 40s] v = hashlib.md5(b"foo")
[ 40s] h = models.Hash.from_hash(v)
[ 40s] > assert h.name == "md5"
[ 40s] E AssertionError: assert 'MD5' == 'md5'
[ 40s] E - MD5
[ 40s] E + md5
[ 40s]
I'm packaging this for openSUSE, and ran into these two errors only on openSUSE Leap 42.3 's Python 2.7, which is 2.7.13 .. it looks like it might even be that the Python hashlib is giving uppercase.