Skip to content

Commit bda92d6

Browse files
committed
-
1 parent fa70a01 commit bda92d6

File tree

1 file changed

+5
-2
lines changed

1 file changed

+5
-2
lines changed

test_python_toolbox/test_cute_profile/test_cute_profile.py

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,7 @@
55

66
import os.path
77
import dummy_threading
8+
import time
89

910
from python_toolbox import cute_profile
1011
from python_toolbox import temp_value_setting
@@ -227,7 +228,7 @@ def test_polite_wrapper():
227228
def 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)

0 commit comments

Comments
 (0)