Coverage for /pythoncovmergedfiles/medio/medio/src/httplib2/tests/fuzz_url.py: 37%
Shortcuts on this page
r m x toggle line displays
j k next/prev highlighted chunk
0 (zero) top of page
1 (one) first highlighted chunk
Shortcuts on this page
r m x toggle line displays
j k next/prev highlighted chunk
0 (zero) top of page
1 (one) first highlighted chunk
1###### Coverage stub
2import atexit
3import coverage
4cov = coverage.coverage(data_file='.coverage', cover_pylib=True)
5cov.start()
6# Register an exist handler that will print coverage
7def exit_handler():
8 cov.stop()
9 cov.save()
10atexit.register(exit_handler)
11####### End of coverage stub
12import sys
13import atheris
15with atheris.instrument_imports():
16 import httplib2
19@atheris.instrument_func
20def TestOneInput(data):
21 fdp = atheris.FuzzedDataProvider(data)
22 original = fdp.ConsumeUnicode(sys.maxsize)
23 try:
24 httplib2.urlnorm(original)
25 except httplib2.RelativeURIError:
26 return
27 return
30def main():
31 atheris.Setup(sys.argv, TestOneInput, enable_python_coverage=True)
32 atheris.Fuzz()
35if __name__ == "__main__":
36 main()