Coverage for /pythoncovmergedfiles/medio/medio/src/onnx/onnx/fuzz/fuzz_checker.py: 33%
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
12# Copyright (c) ONNX Project Contributors
13# SPDX-License-Identifier: Apache-2.0
15import sys
17import atheris
19with atheris.instrument_imports():
20 from onnx import checker
23def TestOneInput(data):
24 try:
25 checker.check_model(data, full_check=True)
26 except Exception:
27 return
30def main():
31 atheris.instrument_all()
32 atheris.Setup(sys.argv, TestOneInput, enable_python_coverage=True)
33 atheris.Fuzz()
36if __name__ == "__main__":
37 main()