def test_faulty(self): import copy modified_in_place = copy.copy(self.default) modified_in_place[options[0][0]] = 'foo' getFullOpts(modified_in_place) self.assertDictEqual(modified_in_place, self.default)
def test_incomplete(self): getFullOpts(self.foo) self.assertDictEqual(self.foo, self.default)
def test_alternative(self): import copy default = dict(((opt[0], opt[1][1]) for opt in options)) modified_in_place = copy.copy(default) getFullOpts(modified_in_place) self.assertDictEqual(modified_in_place, default)
def test_complete(self): import copy modified_in_place = copy.copy(self.default) getFullOpts(modified_in_place) self.assertDictEqual(modified_in_place, self.default)