我在 VB 中有以下代码用于 QC API“查找不在任何测试集中的测试”....我只是想知道如何在 Python 中编写相同的代码?特别是,线testSetFilder.Filter("CY_CYLE") = ">= 0"
VB代码
Public Sub ListUnusedTests()
'Get the list of tests that are not in any test set
Dim testSetF As TestSetFactory
Dim testF As TestFactory
Dim testSetFilter As TDFilter
Dim TestFilter As TDFilter
Dim aTest As Test
Dim testL As List
Set testSetF = tdc.TestSetFactory
Set testSetFilter = testSetF.Filter
' Exclude the default test set.
testSetFilter.Filter("CY_CYCLE") = ">= 0"
Set testF = tdc.TestFactory
Set TestFilter = testF.Filter
TestFilter.SetXFilter "TEST-TESTSET", False, testSetFilter.Text
Set testL = testF.NewList(TestFilter.Text)
Dim Item
For Each Item In testL
Debug.Print Item.Name
Next Item
End Sub
谢谢