(self)
| 1054 | |
| 1055 | class TestArrayWrites(unittest.TestCase): |
| 1056 | def test_int_write(self): |
| 1057 | import array |
| 1058 | contents = [(20-i) for i in range(20)] |
| 1059 | a = array.array('i', contents) |
| 1060 | |
| 1061 | with TemporaryFile("w+", encoding="utf-8", newline='') as fileobj: |
| 1062 | writer = csv.writer(fileobj, dialect="excel") |
| 1063 | writer.writerow(a) |
| 1064 | expected = ",".join([str(i) for i in a])+"\r\n" |
| 1065 | fileobj.seek(0) |
| 1066 | self.assertEqual(fileobj.read(), expected) |
| 1067 | |
| 1068 | def test_double_write(self): |
| 1069 | import array |
nothing calls this directly
no test coverage detected