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:
Robert Loehning
2016-08-25 12:29:02 +02:00
parent 96a9b2bb5b
commit 06ac9f00c0

View File

@@ -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: