(self)
| 1066 | self.assertEqual(fileobj.read(), expected) |
| 1067 | |
| 1068 | def test_double_write(self): |
| 1069 | import array |
| 1070 | contents = [(20-i)*0.1 for i in range(20)] |
| 1071 | a = array.array('d', contents) |
| 1072 | with TemporaryFile("w+", encoding="utf-8", newline='') as fileobj: |
| 1073 | writer = csv.writer(fileobj, dialect="excel") |
| 1074 | writer.writerow(a) |
| 1075 | expected = ",".join([str(i) for i in a])+"\r\n" |
| 1076 | fileobj.seek(0) |
| 1077 | self.assertEqual(fileobj.read(), expected) |
| 1078 | |
| 1079 | def test_float_write(self): |
| 1080 | import array |
nothing calls this directly
no test coverage detected