GeezerVisonThe World Wide Web, restored to 800 pixels of glory. |
| Home|About|Gaming cabinet|Archives|How it works|Starter sites |
GeezerVison is showing github.com — pythonfuzz/pythonfuzz/tracer.py at master · fuzzitdev/pythonfuzz
This repository was archived by the owner on Apr 30, 2021. It is now read-only.
Expand file tree/ Copy pathtracer.pyMore file actions 33 lines (24 loc) · 825 Bytes / Copy pathtracer.pyFile metadata and controls33 lines (24 loc) · 825 Bytes 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 import collections import sys prev_line = 0 prev_filename = '' data = collections.defaultdict(set) def trace(frame, event, arg): if event != 'line': return trace global prev_line global prev_filename func_filename = frame.f_code.co_filename func_line_no = frame.f_lineno if func_filename != prev_filename: # We need a way to keep track of inter-files transferts, # and since we don't really care about the details of the coverage, # concatenating the two filenames in enough. data[func_filename + prev_filename].add((prev_line, func_line_no)) else: data[func_filename].add((prev_line, func_line_no)) prev_line = func_line_no prev_filename = func_filename return trace def get_coverage(): return sum(map(len, data.values())) |
| You are visitor 01402503 — GeezerVison does not store the pages you look up. Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required. |