From 1acfb894bb26ce407393944b054e7b0b4bbaa11e Mon Sep 17 00:00:00 2001 From: GIORGIO Date: Thu, 8 Oct 2026 15:35:24 +0200 Subject: [PATCH 1/3] Fix tests for symbol generation in password function --- tests/test_password.py | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/tests/test_password.py b/tests/test_password.py index 2962859..cb199b9 100644 --- a/tests/test_password.py +++ b/tests/test_password.py @@ -15,3 +15,10 @@ def test_no_digits(): def test_invalid_length(): with pytest.raises(ValueError): generate(0) + +def test_symbols_gen(){ + assert any(c in string.punctuation for c in generate(200, use_symbols=True)) +} + +def test_no_symbols_gen(){ + assert not any(c in string.punctuation for c in generate(200)) From 559127e380850e068f5ca960a2b42613b653b10e Mon Sep 17 00:00:00 2001 From: GIORGIO Date: Thu, 8 Oct 2026 15:37:04 +0200 Subject: [PATCH 2/3] Correct syntax in test_no_symbols_gen function Fix test function syntax and add newline at end of file. --- tests/test_password.py | 1 + 1 file changed, 1 insertion(+) diff --git a/tests/test_password.py b/tests/test_password.py index cb199b9..aed803c 100644 --- a/tests/test_password.py +++ b/tests/test_password.py @@ -22,3 +22,4 @@ def test_symbols_gen(){ def test_no_symbols_gen(){ assert not any(c in string.punctuation for c in generate(200)) +} From f8e1a77898da34f4f9c7b67618172a611619b486 Mon Sep 17 00:00:00 2001 From: GIORGIO Date: Thu, 8 Oct 2026 16:28:43 +0200 Subject: [PATCH 3/3] Fix syntax errors in password generation tests --- tests/test_password.py | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/tests/test_password.py b/tests/test_password.py index aed803c..35ddf08 100644 --- a/tests/test_password.py +++ b/tests/test_password.py @@ -16,10 +16,8 @@ def test_invalid_length(): with pytest.raises(ValueError): generate(0) -def test_symbols_gen(){ +def test_symbols_gen(): assert any(c in string.punctuation for c in generate(200, use_symbols=True)) -} -def test_no_symbols_gen(){ +def test_no_symbols_gen(): assert not any(c in string.punctuation for c in generate(200)) -}