We don't really have much to test here, so throw a generic attribute at it and validate we get the expected results :return:
()
| 9 | |
| 10 | |
| 11 | def test_attribute(): |
| 12 | """ |
| 13 | We don't really have much to test here, so throw a generic attribute at it and validate we get the expected results |
| 14 | |
| 15 | :return: |
| 16 | """ |
| 17 | sAttr = Attribute.getInstance() |
| 18 | info = sAttr.getAttributeInfo("maxRange") |
| 19 | |
| 20 | assert info.attributeID == 54 |
| 21 | assert type(info.attributeID) is int |
| 22 | assert info.attributeName == 'maxRange' |
| 23 | assert type(info.attributeName) is str |
| 24 | assert info.defaultValue == 0.0 |
| 25 | assert type(info.defaultValue) is float |
| 26 | assert info.description == 'Distance below which range does not affect the to-hit equation.' |
| 27 | assert type(info.description) is str |
| 28 | assert info.displayName == 'Optimal Range' |
| 29 | assert type(info.displayName) is str |
| 30 | assert info.highIsGood is True |
| 31 | assert type(info.highIsGood) is bool |
| 32 | assert info.iconID == 1391 |
| 33 | assert type(info.iconID) is int |
| 34 | assert info.name == 'maxRange' |
| 35 | assert type(info.name) is str |
| 36 | assert info.published is True |
| 37 | assert type(info.published) is bool |
| 38 | assert info.unitID == 1 |
| 39 | assert type(info.unitID) is int |
| 40 | assert info.unit.ID == 1 |
| 41 | assert type(info.unit.ID) is int |
| 42 | assert info.unit.displayName == 'm' |
| 43 | assert type(info.unit.displayName) is str |
| 44 | assert info.unit.name == 'Length' |
| 45 | assert type(info.unit.name) is str |
| 46 | assert info.unit.unitID == 1 |
| 47 | assert type(info.unit.unitID) is int |
| 48 | assert info.unit.unitName == 'Length' |
| 49 | assert type(info.unit.unitName) is str |
nothing calls this directly
no test coverage detected