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