Coverage for pyfields/tests/issues/test_issue_53.py: 100%
11 statements
« prev ^ index » next coverage.py v7.2.7, created at 2023-11-06 16:35 +0000
« prev ^ index » next coverage.py v7.2.7, created at 2023-11-06 16:35 +0000
1# Authors: Sylvain Marie <sylvain.marie@se.com>
2#
3# Copyright (c) Schneider Electric Industries, 2019. All right reserved.
5from pyfields import field, init_fields, get_field
8def test_issue_53():
10 class A(object):
11 a = field(str, check_type=True)
13 @init_fields()
14 def __init__(self):
15 pass
17 class B(A):
18 b = field(str, check_type=True)
20 @init_fields()
21 def __init__(self):
22 super(B, self).__init__(a=self.a)
24 # note that with the issue, this was raising an exception
25 print(B('a', 'b'))