(self)
| 1091 | self.assertEqual(fileobj.read(), expected) |
| 1092 | |
| 1093 | def test_double_write(self): |
| 1094 | import array |
| 1095 | contents = [(20-i)*0.1 for i in range(20)] |
| 1096 | a = array.array('d', contents) |
| 1097 | with TemporaryFile("w+", encoding="utf-8", newline='') as fileobj: |
| 1098 | writer = csv.writer(fileobj, dialect="excel") |
| 1099 | writer.writerow(a) |
| 1100 | expected = ",".join([str(i) for i in a])+"\r\n" |
| 1101 | fileobj.seek(0) |
| 1102 | self.assertEqual(fileobj.read(), expected) |
| 1103 | |
| 1104 | def test_float_write(self): |
| 1105 | import array |
nothing calls this directly
no test coverage detected