File tree Expand file tree Collapse file tree 1 file changed +12
-1
lines changed Expand file tree Collapse file tree 1 file changed +12
-1
lines changed Original file line number Diff line number Diff line change 1
1
import os
2
+ import platform
2
3
import shutil
3
4
import sys
4
5
import time
@@ -87,7 +88,17 @@ def _make_big_dir(contents_manager, api_path):
87
88
"""
88
89
)
89
90
90
- for i in range (200 ):
91
+ # since shutil.copy in Windows can't copy the metadata for files
92
+ # the file size of the copied file ends up being smaller than the original
93
+ # we only want to increase the number of folder if the tests is being run on
94
+ # windows, otherwise the for loop doesn't need to run as long as this
95
+ # function is already slow enough
96
+ if platform .system () == "Windows" :
97
+ num_sub_folders = 500
98
+ else :
99
+ num_sub_folders = 200
100
+
101
+ for i in range (num_sub_folders ):
91
102
os .makedirs (f"{ os_path } /subfolder-{ i } " )
92
103
for j in range (200 ):
93
104
shutil .copy (
You can’t perform that action at this time.
0 commit comments