PEATSA/Core/Tests/UnitTests/TestMatrix.py
def testColumnAddition(self):
	
		'''Tests adding a new column
		
		Tests default addition and addition to a specified index.
		Tests that the correct error is raised if index is out of bounds.
		Tests that the correct headers are set for the new columns'''
	
		#Default add
		newColumn = ["Adding", "Column"]
		self.matrix.addColumn(newColumn)
		column = self.matrix.column(2)
		self.assertEqual(column, tuple(newColumn))
		self.assertEqual(3, self.matrix.numberOfColumns())
		
		#Check column header is correct
		header = self.matrix.headerForColumn(2)
		self.assertEqual("None", header)
		
		#Specified index add
		self.matrix.addColumn(newColumn, index=1)
		column = self.matrix.column(1)
		self.assertEqual(column, tuple(newColumn))
		
		#Check column header is correct
		header = self.matrix.headerForColumn(1)
		self.assertEqual("None", header)
		
		#Test range
		self.assertRaises(IndexError, self.matrix.addColumn, newColumn, 10)
Tests adding a new column
		
		Tests default addition and addition to a specified index.
		Tests that the correct error is raised if index is out of bounds.
		Tests that the correct headers are set for the new columns
Tests adding a new column
Tests default addition and addition to a specified index.
Tests that the correct error is raised if index is out of bounds.
Tests that the correct headers are set for the new columns
Tests adding a new column Tests default addition and addition to a specified index . Tests that the correct error is raised if index is out of bounds . Tests that the correct headers are set for the new columns
def testColumnAddition(self):
		newColumn = ["Adding", "Column"]
		self.matrix.addColumn(newColumn)
		column = self.matrix.column(2)
		self.assertEqual(column, tuple(newColumn))
		self.assertEqual(3, self.matrix.numberOfColumns())
		header = self.matrix.headerForColumn(2)
		self.assertEqual("None", header)
		self.matrix.addColumn(newColumn, index=1)
		column = self.matrix.column(1)
		self.assertEqual(column, tuple(newColumn))
		header = self.matrix.headerForColumn(1)
		self.assertEqual("None", header)
		self.assertRaises(IndexError, self.matrix.addColumn, newColumn, 10)
def testColumnAddition ( self ) : newColumn = [ "Adding" , "Column" ] self . matrix . addColumn ( newColumn ) column = self . matrix . column ( 2 ) self . assertEqual ( column , tuple ( newColumn ) ) self . assertEqual ( 3 , self . matrix . numberOfColumns ( ) ) header = self . matrix . headerForColumn ( 2 ) self . assertEqual ( "None" , header ) self . matrix . addColumn ( newColumn , index = 1 ) column = self . matrix . column ( 1 ) self . assertEqual ( column , tuple ( newColumn ) ) header = self . matrix . headerForColumn ( 1 ) self . assertEqual ( "None" , header ) self . assertRaises ( IndexError , self . matrix . addColumn , newColumn , 10 )
Tests adding a new column
Tests default addition and addition to a specified index.
Tests adding a new column Tests default addition and addition to a specified index .
'''Tests adding a new column
		
		Tests default addition and addition to a specified index.
		Tests that the correct error is raised if index is out of bounds.
		Tests that the correct headers are set for the new columns''' #Default add #Check column header is correct #Specified index add #Check column header is correct #Test range
self