summaryrefslogtreecommitdiff
path: root/tests/test.py
blob: 895c4f60410495546b0c160b34d1cb0488331f2a (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
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!')