示例#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())
	def testTheEmptyString(self):
		"""See whether the empty string correctly returns the empty string"""
		words, integers,  indicateIntegers = splitArrayIndicateIntegers('')
		self.assertFalse(sortWordsIntegers(words, integers, indicateIntegers ))
	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() )
	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] )
	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())
	def testNonAplhaNumeric(self):
		words, integers,  indicateIntegers = splitArrayIndicateIntegers('#^&*&')
		self.assertFalse(sortWordsIntegers(words, integers, indicateIntegers ))