Beispiel #1
0
class ByteArrayOutputStreamTest(unittest.TestCase):
	def setUp(self):
		self.__outputStream = ByteArrayOutputStream()


	def tearDown(self):
		self.__outputStream.close()
		self.__outputStream = None


	def test_write(self):
		parts = ('th', 'is is', ' some ', 't', 'ext')
		for part in parts:
			self.__outputStream.write(part)
		self.assertEquals(''.join(parts), self.__outputStream.buffer())
Beispiel #2
0
	def setUp(self):
		self.__outputStream = ByteArrayOutputStream()