Exemplo n.º 1
0
 def test_same_length(self):
     """Test several cases for same_length()."""
     self.assertTrue(hw4.same_length())
     self.assertFalse(hw4.same_length('hi', 'ha', 'it', 'quiet'))
     self.assertTrue(hw4.same_length('hi', 'ha', 'it'))
     self.assertFalse(hw4.same_length('hello', 'ha', 'it', 'ok'))
     self.assertTrue(hw4.same_length('Spartan'))
Exemplo n.º 2
0
 def test_same_length_emtpy_strings_2(self):
     """Test the same length with 1 non empty string"""
     self.assertFalse(hw4.same_length('', 'a', ''))
Exemplo n.º 3
0
 def test_same_length_empty_strings_1(self):
     """Test the same_length with empty strings"""
     self.assertTrue(hw4.same_length('', '', ''))
Exemplo n.º 4
0
 def test_same_length_4_not_same_2(self):
     """Test the same_length with 4 different length arguments."""
     self.assertFalse(hw4.same_length('hello', 'ha', 'it', 'ok'))
Exemplo n.º 5
0
 def test_same_length_4_not_same_1(self):
     """Test the same_length with 4 different length arguments."""
     self.assertFalse(hw4.same_length('hi', 'ha', 'it', 'quiet'))
Exemplo n.º 6
0
 def test_same_length_3_same(self):
     """Test the same_length with 3 same length arguments."""
     self.assertTrue(hw4.same_length('hi', 'ha', 'it'))
Exemplo n.º 7
0
 def test_same_length_1(self):
     """Test the same_length with 1 argument."""
     self.assertTrue(hw4.same_length('Spartan'))
Exemplo n.º 8
0
 def test_same_length_empty(self):
     """Test the same_length with empty argument."""
     self.assertTrue(hw4.same_length())