OILS / core / property_tests.py View on Github | oilshell.org

19 lines, 10 significant
1#!/usr/bin/env python2
2
3import unittest
4
5from hypothesis import given
6from hypothesis.strategies import text
7
8from comp_ui import _PromptLen
9
10
11class PromptTest(unittest.TestCase):
12
13 @given(text())
14 def testNeverPanics(self, s):
15 self.assertIs(_PromptLen(s) >= 0, True)
16
17
18if __name__ == '__main__':
19 unittest.main()