(self)
| 128 | self.assertEqual(a, res) |
| 129 | |
| 130 | def test_dict_dir(self): |
| 131 | class A(object): |
| 132 | def __init__(self): |
| 133 | self.a = 1 |
| 134 | self.b = 2 |
| 135 | def __getattribute__(self, name): |
| 136 | if name=="a": |
| 137 | raise AttributeError |
| 138 | return object.__getattribute__(self, name) |
| 139 | |
| 140 | a = A() |
| 141 | adict = wildcard.dict_dir(a) |
| 142 | assert "a" not in adict # change to assertNotIn method in >= 2.7 |
| 143 | self.assertEqual(adict["b"], 2) |