Add test for alternating case
authorGregor Dschung <redacted>
Sat, 29 Jan 2022 12:53:08 +0000 (13:53 +0100)
committerGregor Dschung <redacted>
Sat, 29 Jan 2022 12:53:32 +0000 (13:53 +0100)
tests/test_xkcdpass.py

index 85cddb94b44887280fe519d5931076f6f12f8a5a..529455b65425aeb328a26f05ca9301eab9f6692d 100644 (file)
@@ -75,6 +75,7 @@ class XkcdPasswordTests(unittest.TestCase):
         self.assertTrue(all(word.isupper() for word in results["upper"]))
         self.assertTrue(all(word.istitle() for word in results["first"]))
         self.assertTrue(all(word.istitle() for word in results["capitalize"]))
+        self.assertEqual(results["alternating"], ["THIS", "is", "ONLY", "a", "GREAT", "test"])
         # Test that the words have been correctly uppered randomly.
         expected_random_result_1_py3 = ['THIS', 'IS', 'ONLY', 'a', 'GREAT', 'test']
         expected_random_result_2_py3 = ['THIS', 'IS', 'a', 'test', 'ALSO', 'GREAT']
git clone https://git.99rst.org/PROJECT