<html><head></head><body><div style="font-family:Helvetica Neue, Helvetica, Arial, sans-serif;font-size:16px;"><div style="font-family:Helvetica Neue, Helvetica, Arial, sans-serif;font-size:16px;">Hello folks,</div><div style="font-family:Helvetica Neue, Helvetica, Arial, sans-serif;font-size:16px;"><br></div><div style="font-family:Helvetica Neue, Helvetica, Arial, sans-serif;font-size:16px;">My name is Alceu and I'm new to this list.</div><div style="font-family:Helvetica Neue, Helvetica, Arial, sans-serif;font-size:16px;"><br></div><div style="font-family:Helvetica Neue, Helvetica, Arial, sans-serif;font-size:16px;">I have already some experience with software testing, but I'm not being able to decide (or find) what is the best way (or pythonic way) to handle a class with hidden attributes.</div><div style="font-family:Helvetica Neue, Helvetica, Arial, sans-serif;font-size:16px;"><br></div><div style="font-family:Helvetica Neue, Helvetica, Arial, sans-serif;font-size:16px;">I have a class that has some hidden attributes and I'm sure that's the way they should be: exposing them is not only unnecessary, but could cause more trouble than helping the developer.</div><div style="font-family:Helvetica Neue, Helvetica, Arial, sans-serif;font-size:16px;"><br></div><div style="font-family:Helvetica Neue, Helvetica, Arial, sans-serif;font-size:16px;">On the other hand, for the class maintainer point of view, unit testing the class instance status after some "public" methods are invoked seems to be quite reasonable.</div><div style="font-family:Helvetica Neue, Helvetica, Arial, sans-serif;font-size:16px;"><br></div><div style="font-family:Helvetica Neue, Helvetica, Arial, sans-serif;font-size:16px;">What is your recommendation about that? Currently I'm declaring those attributes as "__attrib_name", which "hiddens" the attributes, but maybe I should be using properties instead?</div><div style="font-family:Helvetica Neue, Helvetica, Arial, sans-serif;font-size:16px;"><br></div><div style="font-family:Helvetica Neue, Helvetica, Arial, sans-serif;font-size:16px;">Last, but not least, I'm implementing those tests using pytest. Please let me know if there is anything from it that could help me too.</div><div style="font-family:Helvetica Neue, Helvetica, Arial, sans-serif;font-size:16px;"><br></div><div style="font-family:Helvetica Neue, Helvetica, Arial, sans-serif;font-size:16px;">Thanks in advance,</div><div style="font-family:Helvetica Neue, Helvetica, Arial, sans-serif;font-size:16px;"><br></div><div style="font-family:Helvetica Neue, Helvetica, Arial, sans-serif;font-size:16px;">Alceu<br></div></div></body></html>