Staging
v0.5.1
https://github.com/python/cpython
Raw File
Tip revision: 4082f600a5bd69c8f4a36111fa5eb197d7547756 authored by Ned Deily on 01 October 2019, 17:23:17 UTC
3.7.5rc1
Tip revision: 4082f60
test_xxtestfuzz.py
import faulthandler
import test.support
import unittest

_xxtestfuzz = test.support.import_module('_xxtestfuzz')


class TestFuzzer(unittest.TestCase):
    """To keep our https://github.com/google/oss-fuzz API working."""

    def test_sample_input_smoke_test(self):
        """This is only a regression test: Check that it doesn't crash."""
        _xxtestfuzz.run(b"")
        _xxtestfuzz.run(b"\0")
        _xxtestfuzz.run(b"{")
        _xxtestfuzz.run(b" ")
        _xxtestfuzz.run(b"x")
        _xxtestfuzz.run(b"1")


if __name__ == "__main__":
    faulthandler.enable()
    unittest.main()
back to top