MCPcopy Index your code
hub / github.com/sqlmapproject/sqlmap / test

Function test

lib/utils/sgmllib.py:537–570  ·  view source on GitHub ↗
(args=None)

Source from the content-addressed store, hash-verified

535
536
537def test(args=None):
538 import sys
539
540 if args is None:
541 args = sys.argv[1:]
542
543 if args and args[0] == '-s':
544 args = args[1:]
545 klass = SGMLParser
546 else:
547 klass = TestSGMLParser
548
549 if args:
550 file = args[0]
551 else:
552 file = 'test.html'
553
554 if file == '-':
555 f = sys.stdin
556 else:
557 try:
558 f = open(file, 'r')
559 except IOError as msg:
560 print(file, ":", msg)
561 sys.exit(1)
562
563 data = f.read()
564 if f is not sys.stdin:
565 f.close()
566
567 x = klass()
568 for c in data:
569 x.feed(c)
570 x.close()
571
572
573if __name__ == '__main__':

Callers 1

sgmllib.pyFile · 0.70

Calls 3

readMethod · 0.45
closeMethod · 0.45
feedMethod · 0.45

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…