(self)
| 298 | self.assertEqual(f.read(), "12/1\n") |
| 299 | |
| 300 | def testTuples(self): |
| 301 | splootFile = splootFromPython('''x = () |
| 302 | y = ('hi',) |
| 303 | z = ("a", 'b') |
| 304 | print(x, y, z) |
| 305 | ''') |
| 306 | |
| 307 | f = io.StringIO() |
| 308 | f.write = wrapStdout(f.write) |
| 309 | with contextlib.redirect_stdout(f): |
| 310 | executePythonFile(splootFile) |
| 311 | |
| 312 | f.seek(0) |
| 313 | self.assertEqual(f.read(), "() ('hi',) ('a', 'b')\n") |
| 314 | |
| 315 | def testSets(self): |
| 316 | splootFile = splootFromPython('''x = {1, 2, 1, 1} |
nothing calls this directly
no test coverage detected