forked from qt-creator/qt-creator
Squish: Improve probabilty of dirseparator in generateRandomFilePath
With up to 43 characters it's more probable to not have a dirseparator in the generated string. Change-Id: Ib59fc55eb0b78c9796e19006c057571d7d494e40 Reviewed-by: Christian Stenger <christian.stenger@qt.io>
This commit is contained in:
@@ -33,7 +33,7 @@ toolButton = ("{toolTip='%s' type='QToolButton' unnamed='1' visible='1' "
|
|||||||
def generateRandomFilePath(isWin, isHeader):
|
def generateRandomFilePath(isWin, isHeader):
|
||||||
# generate random (fake) file path
|
# generate random (fake) file path
|
||||||
filePath = ''.join(random.choice(string.ascii_letters + string.digits + "/")
|
filePath = ''.join(random.choice(string.ascii_letters + string.digits + "/")
|
||||||
for _ in range(random.randint(3, 15)))
|
for _ in range(random.randint(38, 50)))
|
||||||
if not filePath.startswith("/"):
|
if not filePath.startswith("/"):
|
||||||
filePath = "/" + filePath
|
filePath = "/" + filePath
|
||||||
if isWin:
|
if isWin:
|
||||||
|
Reference in New Issue
Block a user