(self)
| 334 | ]) |
| 335 | |
| 336 | def testDictionaryAssignment(self): |
| 337 | splootFile = splootFromPython('''x = {} |
| 338 | x['fred'] = 'blogs' |
| 339 | x[('foo', 'bar')] = ['list', 'of', 'things'] |
| 340 | print(x) |
| 341 | ''') |
| 342 | |
| 343 | f = io.StringIO() |
| 344 | f.write = wrapStdout(f.write) |
| 345 | with contextlib.redirect_stdout(f): |
| 346 | executePythonFile(splootFile) |
| 347 | |
| 348 | f.seek(0) |
| 349 | self.assertEqual(f.read(), "{'fred': 'blogs', ('foo', 'bar'): ['list', 'of', 'things']}\n") |
| 350 | |
| 351 | def testReturnBare(self): |
| 352 | splootFile = splootFromPython(''' |
nothing calls this directly
no test coverage detected