def test_close(self): dummyfile = DummyFile() assert dummyfile.read() == '' dummyfile.close() self.assertRaises(IOError, dummyfile.read) self.assertRaises(IOError, dummyfile.readline) self.assertRaises(IOError, dummyfile.readlines) self.assertRaises(IOError, iter(dummyfile).next) dummyfile.close()
def test_read(self): dummyfile = DummyFile() assert dummyfile.read() == ''
def test_read_with_arg(self): dummyfile = DummyFile() assert dummyfile.read(9) == '' assert dummyfile.read(1) == ''