- class QTest¶
Synopsis¶
Static functions¶
def
asciiToKey()
def
currentAppName()
def
currentDataTag()
def
failOnWarning()
def
formatString()
def
ignoreMessage()
def
keyToAscii()
def
qCaught()
def
qCleanup()
def
qElementData()
def
qExpectFail()
def
qFindTestData()
def
qGlobalData()
def
qRun()
def
qSkip()
def
qSleep()
def
qWait()
def
runningTest()
def
setThrowOnFail()
def
setThrowOnSkip()
def
testObject()
Note
This documentation may contain snippets that were automatically translated from C++ to Python. We always welcome contributions to the snippet translation. If you see an issue with the translation, you can also let us know by creating a ticket on https:/bugreports.qt.io/projects/PYSIDE
Detailed Description¶
- class TestFailMode¶
- class ComparisonOperation¶
Added in version 6.4.
- class QBenchmarkMetric¶
Added in version 4.7.
- static addColumnInternal(id, name)¶
- Parameters:
id – int
name – str
- static compare_ptr_helper(t1, t2, actual, expected, file, line)¶
- static compare_ptr_helper(t1, t2, actual, expected, file, line)
- Parameters:
t1 –
void
t2 –
void
actual – str
expected – str
file – str
line – int
- Return type:
bool
- static compare_string_helper(t1, t2, actual, expected, file, line)¶
- Parameters:
t1 – str
t2 – str
actual – str
expected – str
file – str
line – int
- Return type:
bool
- static currentAppName()¶
- Return type:
str
- static currentDataTag()¶
- Return type:
str
- static currentTestFailed()¶
- Return type:
bool
- static currentTestFunction()¶
- Return type:
str
- static currentTestResolved()¶
- Return type:
bool
- static failOnWarning()¶
- static failOnWarning(messagePattern)
- Parameters:
messagePattern –
QRegularExpression
- static failOnWarning(message)
- Parameters:
message – str
- static formatString(prefix, suffix, numArguments)¶
- Parameters:
prefix – str
suffix – str
numArguments – int
- Return type:
char
- static ignoreMessage(type, messagePattern)¶
- Parameters:
type –
QtMsgType
messagePattern –
QRegularExpression
- static ignoreMessage(type, message)
- Parameters:
type –
QtMsgType
message – str
- static qCaught(expected, file, line)¶
- Parameters:
expected – str
file – str
line – int
- static qCaught(expected, what, file, line)
- Parameters:
expected – str
what – str
file – str
line – int
- static qCleanup()¶
- static qElementData(elementName, metaTypeId)¶
- Parameters:
elementName – str
metaTypeId – int
- Return type:
void
- static qExpectFail(dataIndex, comment, mode, file, line)¶
- Parameters:
dataIndex – str
comment – str
mode –
TestFailMode
file – str
line – int
- Return type:
bool
- static qExtractTestData(dirName)¶
- Parameters:
dirName – str
- Return type:
QSharedPointer
- static qFindTestData(basepath[, file=None[, line=0[, builddir=None[, sourcedir=None]]]])¶
- Parameters:
basepath – str
file – str
line – int
builddir – str
sourcedir – str
- Return type:
str
- static qFindTestData(basepath[, file=None[, line=0[, builddir=None[, sourcedir=None]]]])
- Parameters:
basepath – str
file – str
line – int
builddir – str
sourcedir – str
- Return type:
str
- static qGlobalData(tagName, typeId)¶
- Parameters:
tagName – str
typeId – int
- Return type:
void
- static qRun()¶
- Return type:
int
- static qSkip(message, file, line)¶
- Parameters:
message – str
file – str
line – int
- static qSleep(ms)¶
- Parameters:
ms – int
- static qWait(ms)¶
- Parameters:
ms – int
- static runningTest()¶
- Return type:
bool
- static setBenchmarkResult(result, metric)¶
- Parameters:
result – float
metric –
QBenchmarkMetric
- static setMainSourcePath(file[, builddir=None])¶
- Parameters:
file – str
builddir – str
- static setThrowOnFail(enable)¶
- Parameters:
enable – bool
- static setThrowOnSkip(enable)¶
- Parameters:
enable – bool
- static toPrettyCString(unicode, length)¶
- Parameters:
unicode – str
length – int
- Return type:
char