diff options
Diffstat (limited to 'tests/test.py')
-rw-r--r-- | tests/test.py | 39 |
1 files changed, 39 insertions, 0 deletions
diff --git a/tests/test.py b/tests/test.py new file mode 100644 index 0000000..895c4f6 --- /dev/null +++ b/tests/test.py @@ -0,0 +1,39 @@ +#!/usr/bin/python3-dbg +# -*- coding: utf-8 -*- + + + +class TestSuite: + + + + + + + + + def print_sep(): + """Print a separator line.""" + + print('------------------------') + + + def check_true(desc, code): + """Check if an expression is true.""" + + try: + test = code() + except: + test = False + + if test: + print('[+] %s: OK' % desc) + else: + print('[+] %s: nok...' % desc) + raise Exception('Unexpected result!') + + + + + + |