mirror of
https://github.com/httprunner/httprunner.git
synced 2026-06-06 08:19:45 +08:00
add setup and teardown block, in these blocks, we can exec functions such as sleep
This commit is contained in:
@@ -28,3 +28,8 @@ def get_current_date(fmt="%Y-%m-%d"):
|
||||
""" get current date, default format is %Y-%m-%d
|
||||
"""
|
||||
return datetime.datetime.now().strftime(fmt)
|
||||
|
||||
def sleep(sec):
|
||||
""" sleep specified seconds
|
||||
"""
|
||||
time.sleep(sec)
|
||||
|
||||
Reference in New Issue
Block a user