@@ -136,15 +136,31 @@ def test_get_dep_names_of_package():
136
136
137
137
138
138
def 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
+ ),
142
157
)
143
158
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"
146
161
)
147
- assert transformed == expected
162
+ assert transformed == (expected , expected , expected )
163
+ assert transform_dep_for_pip ("https://a@b/" ) == "https://a@b/"
148
164
149
165
150
166
def test_is_filesystem_path ():
0 commit comments