| Conditions | 1 |
| Total Lines | 31 |
| Code Lines | 27 |
| Lines | 0 |
| Ratio | 0 % |
| Changes | 0 | ||
| 1 | from unittest import TestCase |
||
| 8 | def test_is_private_or_public(self): |
||
| 9 | # SETUP |
||
| 10 | attribute1 = Attribute( |
||
| 11 | name='attr', |
||
| 12 | type_=int, |
||
| 13 | value=42, |
||
| 14 | doc='some doc', |
||
| 15 | comment='some comment', |
||
| 16 | hint='int', |
||
| 17 | module=None, |
||
| 18 | assigned_value='42', |
||
| 19 | line='attr: int = 42', |
||
| 20 | line_nr=-1) |
||
| 21 | |||
| 22 | attribute2 = Attribute( |
||
| 23 | name='_attr', |
||
| 24 | type_=int, |
||
| 25 | value=42, |
||
| 26 | doc='some doc', |
||
| 27 | comment='some comment', |
||
| 28 | hint='int', |
||
| 29 | module=None, |
||
| 30 | assigned_value='42', |
||
| 31 | line='attr: int = 42', |
||
| 32 | line_nr=-1) |
||
| 33 | |||
| 34 | # EXECUTE & VERIFY |
||
| 35 | self.assertTrue(not attribute1.is_private) |
||
| 36 | self.assertTrue(attribute1.is_public) |
||
| 37 | self.assertTrue(attribute2.is_private) |
||
| 38 | self.assertTrue(not attribute2.is_public) |
||
| 39 | |||
| 86 |