Conditions | 1 |
Total Lines | 13 |
Code Lines | 12 |
Lines | 0 |
Ratio | 0 % |
Changes | 0 |
1 | import pytest |
||
7 | def test_underscore(self): |
||
8 | @decorateme.add_reprs(exclude={"_under"}) |
||
9 | class X: |
||
10 | def __init__(self, s): |
||
11 | self.x = s |
||
12 | self.y = "carrot" |
||
13 | self.z = "" |
||
14 | self._under = "missing" |
||
15 | self.__dunder = "missing" |
||
16 | |||
17 | x = X(5) |
||
18 | assert str(x) == 'X(x=5, y="carrot", z="")' |
||
19 | assert repr(x) == 'X(x=5, y="carrot", z="")' |
||
20 | |||
24 |