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

Class UnitTest

scapy/tools/UTscapy.py:281–304  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

279
280
281class UnitTest(TestClass):
282 def __init__(self, name):
283 self.name = name
284 self.test = ""
285 self.comments = ""
286 self.result = "passed"
287 self.fresult = ""
288 # make instance True at init to have a different truth value than None
289 self.duration = 0
290 self.output = ""
291 self.num = -1
292 self.keywords = set()
293 self.crc = None
294 self.expand = 1
295
296 def prepare(self, theme):
297 if self.result == "passed":
298 self.fresult = theme.success(self.result)
299 else:
300 self.fresult = theme.fail(self.result)
301
302 def __nonzero__(self):
303 return self.result == "passed"
304 __bool__ = __nonzero__
305
306
307# Careful note: all data not included will be set by default.

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…