@@ -224,6 +224,16 @@ def test_complete():
224
224
225
225
try :
226
226
assert "my_package/sub_pgk1/extra_file.xml" not in zip .namelist ()
227
+ assert "my-package-1.2.3.data/scripts/script1.sh" in zip .namelist ()
228
+ assert "my-package-1.2.3.data/scripts/script2.sh" in zip .namelist ()
229
+ assert (
230
+ "Hello World"
231
+ in zip .read ("my-package-1.2.3.data/scripts/script1.sh" ).decode ()
232
+ )
233
+ assert (
234
+ "Hello World"
235
+ in zip .read ("my-package-1.2.3.data/scripts/script2.sh" ).decode ()
236
+ )
227
237
228
238
entry_points = zip .read ("my_package-1.2.3.dist-info/entry_points.txt" )
229
239
@@ -289,6 +299,29 @@ def test_complete():
289
299
290
300
"""
291
301
)
302
+ actual_records = decode (zip .read ("my_package-1.2.3.dist-info/RECORD" ))
303
+
304
+ # For some reason, the ordering of the files and the SHA hashes
305
+ # vary per operating systems and Python versions.
306
+ # So instead of 1:1 assertion, let's do a bit clunkier one:
307
+
308
+ expected_records = [
309
+ "my_package/__init__.py" ,
310
+ "my_package/data1/test.json" ,
311
+ "my_package/sub_pkg1/__init__.py" ,
312
+ "my_package/sub_pkg2/__init__.py" ,
313
+ "my_package/sub_pkg2/data2/data.json" ,
314
+ "my-package-1.2.3.data/scripts/script1.sh" ,
315
+ "my-package-1.2.3.data/scripts/script2.sh" ,
316
+ "my_package-1.2.3.dist-info/entry_points.txt" ,
317
+ "my_package-1.2.3.dist-info/LICENSE" ,
318
+ "my_package-1.2.3.dist-info/WHEEL" ,
319
+ "my_package-1.2.3.dist-info/METADATA" ,
320
+ ]
321
+
322
+ for expected_record in expected_records :
323
+ assert expected_record in actual_records
324
+
292
325
finally :
293
326
zip .close ()
294
327
@@ -317,6 +350,8 @@ def test_complete_no_vcs():
317
350
"my_package/sub_pkg1/__init__.py" ,
318
351
"my_package/sub_pkg2/__init__.py" ,
319
352
"my_package/sub_pkg2/data2/data.json" ,
353
+ "my-package-1.2.3.data/scripts/script1.sh" ,
354
+ "my-package-1.2.3.data/scripts/script2.sh" ,
320
355
"my_package/sub_pkg3/foo.py" ,
321
356
"my_package-1.2.3.dist-info/entry_points.txt" ,
322
357
"my_package-1.2.3.dist-info/LICENSE" ,
0 commit comments