Esempio n. 1
0
 def test_NumericStringisAllLettersreturnsFalse(self):
     string = "123"
     reg = Regex(string)
     actual = reg.isAllLetters(pattern="^[0-9]+$")
     expected = True
     self.assertEqual(actual, expected)
Esempio n. 2
0
 def test_NumericWithAlphaStringisAllLettersreturnsFalse(self):
     string = "123ABC"
     reg = Regex(string)
     actual = reg.isAllLetters(pattern="^[a-zA-Z]+$")
     expected = False
     self.assertEqual(actual, expected)
Esempio n. 3
0
 def test_emptyStringisAllLettersreturnsFalse(self):
     string = ""
     reg = Regex(string)
     actual = reg.isAllLetters()
     expected = False
     self.assertEqual(actual, expected)
Esempio n. 4
0
 def test_NumericStringisAllLettersreturnsFalse(self):
     string = "1231414"
     reg = Regex(string)
     actual = reg.isAllLetters()
     expected = False
     self.assertEqual(actual, expected)
Esempio n. 5
0
 def test_isAllLettersreturnsTrue(self):
     string = "HelloWorld"
     reg = Regex(string)
     actual = reg.isAllLetters()
     expected = True
     self.assertEqual(actual, expected)