diff options
author | Damien George <damien.p.george@gmail.com> | 2015-08-21 11:56:14 +0100 |
---|---|---|
committer | Damien George <damien.p.george@gmail.com> | 2015-08-21 12:02:09 +0100 |
commit | d007cb890394d9d26c6fafb133532a5175d91eb2 (patch) | |
tree | 4fc76a836e7f9738d146bacac9b02f2e288c144b /tests/basics/class2.py | |
parent | d292a81e95bd558f3902f88fa4d6d5641a4aa388 (diff) |
tests: Add more tests to improve coverage, mostly testing exceptions.
Diffstat (limited to 'tests/basics/class2.py')
-rw-r--r-- | tests/basics/class2.py | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/tests/basics/class2.py b/tests/basics/class2.py index 64f1f62b9..8ab3ef2b3 100644 --- a/tests/basics/class2.py +++ b/tests/basics/class2.py @@ -15,3 +15,12 @@ class C2: c2 = C2(4) print(type(c2) == C2) print(c2.x) + +# __init__ should return None +class C3: + def __init__(self): + return 10 +try: + C3() +except TypeError: + print('TypeError') |