MCPcopy Create free account
hub / github.com/secdev/scapy / TestCampaign

Class TestCampaign

scapy/tools/UTscapy.py:223–258  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

221
222
223class TestCampaign(TestClass):
224 def __init__(self, title):
225 self.title = title
226 self.filename = None
227 self.headcomments = ""
228 self.campaign = []
229 self.keywords = set()
230 self.crc = None
231 self.sha = None
232 self.preexec = None
233 self.preexec_output = None
234 self.end_pos = 0
235 self.interrupted = False
236 self.duration = 0.0
237
238 def add_testset(self, testset):
239 self.campaign.append(testset)
240 testset.keywords.update(self.keywords)
241
242 def trunc(self, index):
243 self.campaign = self.campaign[:index]
244
245 def startNum(self, beginpos):
246 for ts in self:
247 for t in ts:
248 t.num = beginpos
249 beginpos += 1
250 self.end_pos = beginpos
251
252 def __iter__(self):
253 return self.campaign.__iter__()
254
255 def all_tests(self):
256 for ts in self:
257 for t in ts:
258 yield t
259
260
261class TestSet(TestClass):

Callers 1

parse_campaign_fileFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…