File tree Expand file tree Collapse file tree 1 file changed +5
-2
lines changed
test_python_toolbox/test_cute_profile Expand file tree Collapse file tree 1 file changed +5
-2
lines changed Original file line number Diff line number Diff line change 55
66import os .path
77import dummy_threading
8+ import time
89
910from python_toolbox import cute_profile
1011from python_toolbox import temp_value_setting
@@ -227,7 +228,7 @@ def test_polite_wrapper():
227228def test_folder_handler ():
228229 with temp_value_setting .TempValueSetter ((cute_profile .profile_handling ,
229230 'threading' ), dummy_threading ):
230- with temp_file_tools .TemporaryFolder (suffix = 'python_toolbox_testing' ) \
231+ with temp_file_tools .TemporaryFolder (suffix = '_python_toolbox_testing' ) \
231232 as temp_folder :
232233 f = cute_profile .profile_ready (profile_handler = temp_folder )(func )
233234
@@ -245,9 +246,11 @@ def test_folder_handler():
245246 f (1 , 2 )
246247 assert len (os .listdir (temp_folder )) == 1
247248
248- f . profiling_on = True
249+ time . sleep ( 0.01 ) # To make for a different filename.
249250
251+ f .profiling_on = True
250252 f (1 , 2 )
253+
251254 assert len (os .listdir (temp_folder )) == 2
252255
253256 f (1 , 2 )
You can’t perform that action at this time.
0 commit comments