Thanks to visit codestin.com Credit goes to github.com
We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 0f7876f commit 0dda85aCopy full SHA for 0dda85a
src/tests/test_subclass.py
@@ -192,19 +192,15 @@ def test_isinstance_check():
192
assert isinstance(x, System.String)
193
194
195
-_derived_cons_calls = 0
196
-
197
def test_derived_constructor_only_called_once():
198
- global _derived_cons_calls
199
- _derived_cons_calls = 0
+ calls = []
200
201
class X(System.Object):
202
__namespace__ = "PyTest"
203
204
- def __init__(self):
205
206
- _derived_cons_calls += 1
+ def __init__(self, *args):
+ calls.append(args)
207
208
- x = X()
+ x = X(1, 2)
209
210
- assert _derived_cons_calls == 1
+ assert calls == [(1, 2)]
0 commit comments