(self)
| 1079 | |
| 1080 | class TestArrayWrites(unittest.TestCase): |
| 1081 | def test_int_write(self): |
| 1082 | import array |
| 1083 | contents = [(20-i) for i in range(20)] |
| 1084 | a = array.array('i', contents) |
| 1085 | |
| 1086 | with TemporaryFile("w+", encoding="utf-8", newline='') as fileobj: |
| 1087 | writer = csv.writer(fileobj, dialect="excel") |
| 1088 | writer.writerow(a) |
| 1089 | expected = ",".join([str(i) for i in a])+"\r\n" |
| 1090 | fileobj.seek(0) |
| 1091 | self.assertEqual(fileobj.read(), expected) |
| 1092 | |
| 1093 | def test_double_write(self): |
| 1094 | import array |
nothing calls this directly
no test coverage detected