不允许在十进制整数文字中使用前导零;对八进制整数使用 0o 前缀
leading zeros in decimal integer literals are not permitted; use an 0o prefix for octal integers
我在 Robot Framework 中有一个步骤来检查持续时间是否 > 20 分钟然后失败。
当实际分钟为 09 时要解决什么问题?如果是 10,11 没问题....
错误:Evaluating expression '09 > 20' failed: SyntaxError: leading zeros in decimal integer literals are not permitted; use an 0o prefix for octal integers (<string>, line 1)
测试步骤:
Run Keyword And Continue On Failure Run Keyword If ${modelTrainedDuration} > ${minutes} fail Model Trained Duration is more than ${minutes} minutes
在变量中使用双引号,它会解决你的问题
Run Keyword And Continue On Failure Run Keyword If "${modelTrainedDuration}" > "${minutes}" fail Model Trained Duration is more than ${minutes} minutes
我在 Robot Framework 中有一个步骤来检查持续时间是否 > 20 分钟然后失败。
当实际分钟为 09 时要解决什么问题?如果是 10,11 没问题....
错误:Evaluating expression '09 > 20' failed: SyntaxError: leading zeros in decimal integer literals are not permitted; use an 0o prefix for octal integers (<string>, line 1)
测试步骤:
Run Keyword And Continue On Failure Run Keyword If ${modelTrainedDuration} > ${minutes} fail Model Trained Duration is more than ${minutes} minutes
在变量中使用双引号,它会解决你的问题
Run Keyword And Continue On Failure Run Keyword If "${modelTrainedDuration}" > "${minutes}" fail Model Trained Duration is more than ${minutes} minutes