Beispiel #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'))
Beispiel #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', ''))
Beispiel #3
0
 def test_same_length_empty_strings_1(self):
     """Test the same_length with empty strings"""
     self.assertTrue(hw4.same_length('', '', ''))
Beispiel #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'))
Beispiel #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'))
Beispiel #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'))
Beispiel #7
0
 def test_same_length_1(self):
     """Test the same_length with 1 argument."""
     self.assertTrue(hw4.same_length('Spartan'))
Beispiel #8
0
 def test_same_length_empty(self):
     """Test the same_length with empty argument."""
     self.assertTrue(hw4.same_length())