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