def test_create_write(self): new_iso_path = os.path.join(self.tmpdir, 'new.iso') new_iso = iso9660.ISO9660PyCDLib(new_iso_path) new_iso.create() content = b"AVOCADO" for path in ("README", "/readme", "readme.txt", "quite-long-readme.txt"): new_iso.write(path, content) new_iso.close() read_iso = iso9660.ISO9660PyCDLib(new_iso_path) self.assertEqual(read_iso.read(path), content) self.assertTrue(os.path.isfile(new_iso_path))
def setUp(self): super(PyCDLib, self).setUp() self.iso = iso9660.ISO9660PyCDLib(self.iso_path)