예제 #1
0
 def testTheEmptyString(self):
     """See whether the empty string correctly returns the empty string"""
     words, integers, indicateIntegers = splitArrayIndicateIntegers('')
     self.assertFalse(sortWordsIntegers(words, integers, indicateIntegers))
예제 #2
0
 def testTwoNumbersSort(self):
     """Check the positive and negative number sorting"""
     words, integers, indicateIntegers = splitArrayIndicateIntegers(
         ['23', '-23'])
     array = sortWordsIntegers(words, integers, indicateIntegers)
     self.assertTrue(array[0] < array[1])
예제 #3
0
 def testUpperLowerSort(self):
     """Check the upper and lower case character sorting"""
     words, integers, indicateIntegers = splitArrayIndicateIntegers(
         ['B', 'a'])
     array = sortWordsIntegers(words, integers, indicateIntegers)
     self.assertTrue(array[0].lower() < array[1].lower())
예제 #4
0
 def testNonAplhaNumeric(self):
     words, integers, indicateIntegers = splitArrayIndicateIntegers('#^&*&')
     self.assertFalse(sortWordsIntegers(words, integers, indicateIntegers))
예제 #5
0
 def testAlphabetic(self):
     """See whether the numeric string correctly returns the numeric string"""
     words, integers, indicateIntegers = splitArrayIndicateIntegers('ajd')
     words = sortWordsIntegers(words, integers, indicateIntegers)
     self.assertFalse(words[0].isdigit())
예제 #6
0
	def testTheEmptyString(self):
		"""See whether the empty string correctly returns the empty string"""
		words, integers,  indicateIntegers = splitArrayIndicateIntegers('')
		self.assertFalse(sortWordsIntegers(words, integers, indicateIntegers ))
예제 #7
0
	def testUpperLowerSort(self):
		"""Check the upper and lower case character sorting"""
		words, integers,  indicateIntegers = splitArrayIndicateIntegers(['B', 'a'])
		array = sortWordsIntegers(words, integers, indicateIntegers )
		self.assertTrue( array[0].lower() < array[1].lower() )
예제 #8
0
	def testTwoNumbersSort(self):
		"""Check the positive and negative number sorting"""
		words, integers,  indicateIntegers = splitArrayIndicateIntegers(['23', '-23'])
		array = sortWordsIntegers(words, integers, indicateIntegers )
		self.assertTrue( array[0] < array[1] )
예제 #9
0
	def testAlphabetic(self):
		"""See whether the numeric string correctly returns the numeric string"""
		words, integers,  indicateIntegers = splitArrayIndicateIntegers('ajd')
		words = sortWordsIntegers(words, integers, indicateIntegers)
		self.assertFalse(words[0].isdigit())
예제 #10
0
	def testNonAplhaNumeric(self):
		words, integers,  indicateIntegers = splitArrayIndicateIntegers('#^&*&')
		self.assertFalse(sortWordsIntegers(words, integers, indicateIntegers ))