• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1import faulthandler
2import test.support
3import unittest
4
5_xxtestfuzz = test.support.import_module('_xxtestfuzz')
6
7
8class TestFuzzer(unittest.TestCase):
9    """To keep our https://github.com/google/oss-fuzz API working."""
10
11    def test_sample_input_smoke_test(self):
12        """This is only a regression test: Check that it doesn't crash."""
13        _xxtestfuzz.run(b"")
14        _xxtestfuzz.run(b"\0")
15        _xxtestfuzz.run(b"{")
16        _xxtestfuzz.run(b" ")
17        _xxtestfuzz.run(b"x")
18        _xxtestfuzz.run(b"1")
19
20
21if __name__ == "__main__":
22    faulthandler.enable()
23    unittest.main()
24