-
Notifications
You must be signed in to change notification settings - Fork 173
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Test pass gen #290
Open
abdelfattehjarray
wants to merge
11
commits into
codezoned:master
Choose a base branch
from
weissfennek:test_pass_gen
base: master
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Test pass gen #290
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
…thms.src.RectangleOperations closes #52
Added a test for the method Rectangle.multiply in Mathematical_Algori…
Added tests that cover `linear_search_recursion.py`.
…onne efficacement en triant correctement une liste d'éléments dans l'ordre croissant. Ce test est un exemple pratique de la façon dont l'algorithme de tri Bubble Sort peut être utilisé pour trier de grandes quantités de données en un temps relativement court. Cependant, bien que l'algorithme de tri Bubble Sort soit relativement simple à comprendre et à implémenter, il peut avoir des performances sous-optimales dans certaines situations, en particulier lorsque le nombre d'éléments à trier est très élevé. Il peut également nécessiter plus de temps pour trier une liste si celle-ci est initialement désordonnée ou si elle contient des doublons. Dans l'ensemble, le test_Bubble_Sort est un excellent moyen de vérifier la fiabilité et l'efficacité de l'algorithme de tri Bubble Sort dans des conditions normales d'utilisation. Cependant, il est important de garder à l'esprit les limites de cet algorithme et de considérer d'autres options de tri en fonction des besoins spécifiques de chaque cas d'utilisation. closes#60
…onne efficacement en triant correctement une liste d'éléments dans l'ordre croissant. Ce test est un exemple pratique de la façon dont l'algorithme de tri Bubble Sort peut être utilisé pour trier de grandes quantités de données en un temps relativement court. Cependant, bien que l'algorithme de tri Bubble Sort soit relativement simple à comprendre et à implémenter, il peut avoir des performances sous-optimales dans certaines situations, en particulier lorsque le nombre d'éléments à trier est très élevé. Il peut également nécessiter plus de temps pour trier une liste si celle-ci est initialement désordonnée ou si elle contient des doublons. Dans l'ensemble, le test_Bubble_Sort est un excellent moyen de vérifier la fiabilité et l'efficacité de l'algorithme de tri Bubble Sort dans des conditions normales d'utilisation. Cependant, il est important de garder à l'esprit les limites de cet algorithme et de considérer d'autres options de tri en fonction des besoins spécifiques de chaque cas d'utilisation. closes#60
Test bubble sort
…n empty array, an already sorted array and at the end an array containing duplicates. closes #61
We added test_Insertio_Sort.py which takes into account a test with a…
Removed the import statement: The updated code removed the import statement, which was importing a module called CreatePasswords. This module was not defined in the code snippet, and it is not required for the functionality of the program. Added an if name == main: block: This block is used to ensure that the code inside the block only runs when the module is executed as the main program. This is important because it prevents the code inside the block from running if the module is imported as a library into another program. Exception handling for input validation: The updated code includes a try-except block for input validation. This is used to catch any exceptions that may occur when the user enters input that cannot be converted to an integer. If an exception is caught, the code prints an error message and continues the loop, asking the user for input again. Changed variable naming convention: The updated code uses snake_case naming convention for variables instead of camelCase, which is a common convention in Python. Changed user input prompt: The updated code changes the user input prompt to make it clearer and more user-friendly. Overall, the changes made in the updated version of the code improve its readability, maintainability, and robustness. The exception handling ensures that the program does not crash if the user enters invalid input, and the if name == main: block makes it clear which part of the code is the main program. The changes to the variable naming convention and the user input prompt make the code more readable and user-friendly.
Removed the import statement: The updated code removed the import statement, which was importing a module called CreatePasswords. This module was not defined in the code snippet, and it is not required for the functionality of the program. Added an if name == main: block: This block is used to ensure that the code inside the block only runs when the module is executed as the main program. This is important because it prevents the code inside the block from running if the module is imported as a library into another program. Exception handling for input validation: The updated code includes a try-except block for input validation. This is used to catch any exceptions that may occur when the user enters input that cannot be converted to an integer. If an exception is caught, the code prints an error message and continues the loop, asking the user for input again. Changed variable naming convention: The updated code uses snake_case naming convention for variables instead of camelCase, which is a common convention in Python. Changed user input prompt: The updated code changes the user input prompt to make it clearer and more user-friendly. Overall, the changes made in the updated version of the code improve its readability, maintainability, and robustness. The exception handling ensures that the program does not crash if the user enters invalid input, and the if name == main: block makes it clear which part of the code is the main program. The changes to the variable naming convention and the user input prompt make the code more readable and user-friendly.
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There are several changes in the updated version of the code:
Removed the import statement: The updated code removed the import statement, which was importing a module called "CreatePasswords". This module was not defined in the code snippet, and it is not required for the functionality of the program.
Added an if name == "main": block: This block is used to ensure that the code inside the block only runs when the module is executed as the main program. This is important because it prevents the code inside the block from running if the module is imported as a library into another program.
Exception handling for input validation: The updated code includes a try-except block for input validation. This is used to catch any exceptions that may occur when the user enters input that cannot be converted to an integer. If an exception is caught, the code prints an error message and continues the loop, asking the user for input again.
Changed variable naming convention: The updated code uses snake_case naming convention for variables instead of camelCase, which is a common convention in Python.
Changed user input prompt: The updated code changes the user input prompt to make it clearer and more user-friendly.
Overall, the changes made in the updated version of the code improve its readability, maintainability, and robustness. The exception handling ensures that the program does not crash if the user enters invalid input, and the if name == "main": block makes it clear which part of the code is the main program. The changes to the variable naming convention and the user input prompt make the code more readable and user-friendly.
The test_pass_gen.py script is designed to test the functionality of the pass_gen.py script, which generates a random password based on user input.
The script contains several functions that test different aspects of the password generation process. Here is a summary of the functions and what they test:
test_password_length(): tests that the length of the generated password matches the user input.
test_password_content(): tests that the generated password contains only letters, digits, and symbols.
test_password_type(): tests that the generated password is of type string.
test_user_reply(): tests the user_reply() function, which is used to validate user input.
If all the tests pass successfully, the script prints a message to the console indicating that all tests have passed.