# Test that the words have been uppered or lowered respectively.
self.assertTrue(all(word.islower() for word in results["lower"]))
self.assertTrue(all(word.isupper() for word in results["upper"]))
+ self.assertTrue(all(word.istitle() for word in results["first"]))
# Test that the words have been correctly uppered randomly.
- expected_random_result_1 = ['THIS', 'IS', 'ONLY', 'a', 'test']
- expected_random_result_2 = ['THIS', 'IS', 'a', 'test', 'ALSO']
+ expected_random_result_1_py3 = ['THIS', 'IS', 'ONLY', 'a', 'test']
+ expected_random_result_2_py3 = ['THIS', 'IS', 'a', 'test', 'ALSO']
+ expected_random_result_1_py2 = ['this', 'is', 'only', 'a', 'TEST']
+ expected_random_result_2_py2 = ['this', 'is', 'a', 'TEST', 'also']
words_extra = "this is a test also".lower().split()
observed_random_result_1 = results["random"]