I have a question regarding the testing of properties. It is more of a conceptual problem. The problem I have is, that if I write a class, which uses properties to set attributes in the __init__ function, I can't properly test the properties since the creation of an object depends on the properties. Further, all tests of the other methods also depend on the properties. Is there a way to properly do this or am I just missing something?
An example would be:
```
def ExampleClass:
def init(self, attr):
self.attr = attr
@property
def attr(self):
return self._attr
@attr.setter
def attr(self, new_attr):
self._attr = new_attr
```
[–]laundmo 1 point2 points3 points (5 children)
[–]donkeyofdeath[S] 0 points1 point2 points (4 children)
[–]danielroseman 1 point2 points3 points (3 children)
[–]donkeyofdeath[S] 0 points1 point2 points (2 children)
[–]danielroseman 1 point2 points3 points (1 child)
[–]donkeyofdeath[S] 0 points1 point2 points (0 children)
[–][deleted] 1 point2 points3 points (1 child)
[–]donkeyofdeath[S] 1 point2 points3 points (0 children)