Closed Lexikos closed 4 years ago
Related: __init
is also called as a test.
__init
might be used to set ExpectedException
(which seems to be undocumented) for a class of tests that should all throw the same exception.
Instead, ExpectedException
can be set by each test.
I've excluded New and Delete from being called as tests, and updated the v2 branch to work with a108 after merging in your a104 fixes
I considered using this to remove some test methods from the new instance if certain conditions aren't met. However, it seems that
__new
and__delete
are not excluded from the testing; i.e. they are assumed to be test methods, are called again, and shown in the results.My idea wouldn't work anyway, since the methods are in the class, not the instance.
Instead, I can work around it and also achieve what I was after by overriding
_NewEnum
.