Merge pull request #96 from szaydel/szaydel/add-capitalize
authorSteven Tobin <redacted>
Sun, 8 Apr 2018 16:45:14 +0000 (17:45 +0100)
committerGitHub <redacted>
Sun, 8 Apr 2018 16:45:14 +0000 (17:45 +0100)
Want to have option to capitalize first letter of each word.

1  2 
tests/test_xkcdpass.py

index 2993796e4ba0a61591450c1f9d7b02a1e8d9a924,6350df2dc25acd07ce847a1ac560d1e55193fbcf..516b0285855a2ba474c41aa5a3a58f679855232c
@@@ -66,11 -85,10 +67,12 @@@ class XkcdPasswordTests(unittest.TestCa
          # 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"]
git clone https://git.99rst.org/PROJECT