Forum Discussion
stein_oddvar_ra
5 years agoContributor
Yeah, why not?
Legacy is the short and long answer. We probably can work around it, but since our test suite is a decade old by now the risk of breaking something is holding us back...
Marsha_R
Champion Level 3
5 years agoBecause you can add them once manually and never have to do it again and never have it interfere with a test.
- stein_oddvar_ra5 years agoContributor
Yes, I know.
I can work around it.
I'm curious about the reason for Python not being able to delete more than half of the TestedApps in one go, though.
- ebarbera5 years ago
Staff
Hi stein_oddvar_ra -
Is the count in the python script returning the full number of applications?
Emma
- stein_oddvar_ra5 years agoContributor
Hi, ebarbera
Yes it does. I use the TestedApps.Count value to set the number of times to iterate. The code is simple:
def del_applications():
# Deletes all applications from the TestedApps
numApps = TestedApps.Count
Log.Message(f"Deleting {numApps} apps from TestedApps.")
for i in range(numApps):
if not TestedApps.Delete(i):
Log.Warning(f"Could not delete app index {i} from TestedApps")It logs the correct number of apps, but deletes only the first half of them. The rest fails.
The bug is present in TestComplete 15.10.445.7