MCPcopy Create free account
hub / github.com/PaddlePaddle/FastDeploy / test_reentrant

Function test_reentrant

tests/ce/server/test_update_weight.py:135–146  ·  view source on GitHub ↗

重入调用测试: 1. pause 两次 -> 状态仍为 True 2. resume 两次 -> 状态仍为 False

()

Source from the content-addressed store, hash-verified

133# 测试用例2:重复调用
134# ---------------------------
135def test_reentrant():
136 """
137 重入调用测试:
138 1. pause 两次 -> 状态仍为 True
139 2. resume 两次 -> 状态仍为 False
140 """
141 pause()
142 pause()
143 is_paused(expected=True)
144 resume()
145 resume()
146 is_paused(expected=False)
147
148
149# ---------------------------

Callers 1

Calls 3

pauseFunction · 0.70
is_pausedFunction · 0.70
resumeFunction · 0.70

Tested by

no test coverage detected