Skip to content

Commit fff677f

Browse files
committed
Update test_pickle_patcher.py
1 parent bb6b29d commit fff677f

File tree

1 file changed

+7
-0
lines changed

1 file changed

+7
-0
lines changed

tests/test_pickle_patcher.py

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -299,6 +299,13 @@ def test_run_and_parse_picklepatch() -> None:
299299
# Function might be too fast, so we allow 0.0 function_time
300300
assert function_time >= 0.0
301301
assert percent >= 0.0
302+
used_socket_results = function_to_results["code_to_optimize.bubble_sort_picklepatch_test_used_socket.bubble_sort_with_used_socket"]
303+
# on windows , if the socket is not used we might not have resultssss
304+
if used_socket_results:
305+
test_name, total_time, function_time, percent = used_socket_results[0]
306+
assert total_time > 0.0
307+
assert function_time >= 0.0
308+
assert percent >= 0.0
302309

303310
bubble_sort_unused_socket_path = (project_root / "code_to_optimize"/ "bubble_sort_picklepatch_test_unused_socket.py").as_posix()
304311
bubble_sort_used_socket_path = (project_root / "code_to_optimize" / "bubble_sort_picklepatch_test_used_socket.py").as_posix()

0 commit comments

Comments
 (0)