'Check that trying to call write() on a readonly ZipFile object
raises a RuntimeError.'

def test_write_to_readonly(self):

    with zipfile.ZipFile(TESTFN2, mode='w') as zipfp:
        zipfp.writestr('somefile.txt', 'bogus')
    with zipfile.ZipFile(TESTFN2, mode='r') as zipfp:
        self.assertRaises(RuntimeError, zipfp.write, TESTFN)
