(self)
| 160 | self.assertEqual(expected, options.as_dict()) |
| 161 | |
| 162 | def test_group_dict(self): |
| 163 | options = OptionParser() |
| 164 | options.define("a", default=1) |
| 165 | options.define("b", group="b_group", default=2) |
| 166 | |
| 167 | frame = sys._getframe(0) |
| 168 | this_file = frame.f_code.co_filename |
| 169 | self.assertEqual(set(["b_group", "", this_file]), options.groups()) |
| 170 | |
| 171 | b_group_dict = options.group_dict("b_group") |
| 172 | self.assertEqual({"b": 2}, b_group_dict) |
| 173 | |
| 174 | self.assertEqual({}, options.group_dict("nonexistent")) |
| 175 | |
| 176 | def test_mock_patch(self): |
| 177 | # ensure that our setattr hooks don't interfere with mock.patch |
nothing calls this directly
no test coverage detected