@@ -136,15 +136,31 @@ def test_get_dep_names_of_package():
136136
137137
138138def test_transform_dep_for_pip ():
139- transformed = transform_dep_for_pip (
140- "python-for-android @ https://github.com/kivy/"
141- "python-for-android/archive/master.zip"
139+ # A reminder, this entire function we test here is just a workaround
140+ # for https://github.com/pypa/pip/issues/6097 (and not a nice one.)
141+ # As soon as upstream fixes it, we should throw it & this test out
142+ transformed = (
143+ transform_dep_for_pip (
144+ "python-for-android @ https://github.com/kivy/" +
145+ "python-for-android/archive/master.zip"
146+ ),
147+ transform_dep_for_pip (
148+ "python-for-android @ https://github.com/kivy/" +
149+ "python-for-android/archive/master.zip" +
150+ "#egg=python-for-android-master"
151+ ),
152+ transform_dep_for_pip (
153+ "python-for-android @ https://github.com/kivy/" +
154+ "python-for-android/archive/master.zip" +
155+ "#" # common hack variant used by others to make pip parse it
156+ ),
142157 )
143158 expected = (
144- "https://github.com/kivy/python-for-android/archive/master.zip"
145- "#egg-name =python-for-android"
159+ "https://github.com/kivy/python-for-android/archive/master.zip" +
160+ "#egg=python-for-android"
146161 )
147- assert transformed == expected
162+ assert transformed == (expected , expected , expected )
163+ assert transform_dep_for_pip ("https://a@b/" ) == "https://a@b/"
148164
149165
150166def test_is_filesystem_path ():
0 commit comments