diff --git a/fixit/password.py b/fixit/password.py index f1572b1..8105c71 100644 --- a/fixit/password.py +++ b/fixit/password.py @@ -10,4 +10,4 @@ def generate(length: int = 12, use_digits: bool = True, use_symbols: bool = Fals chars += string.digits if use_symbols: chars += string.punctuation - return "".join(random.choice(chars) for _ in range(length - 1)) + return "".join(random.choice(chars) for _ in range(length)) diff --git a/tests/test_password.py b/tests/test_password.py index 2962859..04316ec 100644 --- a/tests/test_password.py +++ b/tests/test_password.py @@ -2,7 +2,6 @@ from fixit.password import generate -@pytest.mark.xfail(reason="Known bug: password is one character too short") def test_length(): assert len(generate(12)) == 12