修复test_case排序问题
This commit is contained in:
@@ -1,3 +1,4 @@
|
||||
import re
|
||||
import datetime
|
||||
import random
|
||||
from base64 import b64encode
|
||||
@@ -57,3 +58,8 @@ def datetime2str(value, format="iso-8601"):
|
||||
|
||||
def timestamp2utcstr(value):
|
||||
return datetime.datetime.utcfromtimestamp(value).isoformat()
|
||||
|
||||
|
||||
def natural_sort_key(s, _nsre=re.compile(r"(\d+)")):
|
||||
return [int(text) if text.isdigit() else text.lower()
|
||||
for text in re.split(_nsre, s)]
|
||||
|
||||
Reference in New Issue
Block a user