(self)
| 191 | class TestDecorateSortUndecorate(unittest.TestCase): |
| 192 | |
| 193 | def test_decorated(self): |
| 194 | data = 'The quick Brown fox Jumped over The lazy Dog'.split() |
| 195 | copy = data[:] |
| 196 | random.shuffle(data) |
| 197 | data.sort(key=str.lower) |
| 198 | def my_cmp(x, y): |
| 199 | xlower, ylower = x.lower(), y.lower() |
| 200 | return (xlower > ylower) - (xlower < ylower) |
| 201 | copy.sort(key=cmp_to_key(my_cmp)) |
| 202 | |
| 203 | def test_baddecorator(self): |
| 204 | data = 'The quick Brown fox Jumped over The lazy Dog'.split() |
nothing calls this directly
no test coverage detected