Conversation
There was a problem hiding this comment.
Pull Request Overview
This PR fixes a never ending loop bug when using multiple --add commands by tracking already executed operations. Key changes include:
- Adding the pytest-timeout dependency in tox.ini.
- Updating test expectations and adding a new test case to ensure the loop fix works correctly.
- Preparing the testdata for the new infinite loop test in conftest.py.
Reviewed Changes
Copilot reviewed 4 out of 4 changed files in this pull request and generated 1 comment.
| File | Description |
|---|---|
| tox.ini | Added pytest-timeout dependency to support timeout testing. |
| tests/test_app.py | Updated expected line counts and added a new test for loop detection. |
| tests/conftest.py | Created test input file for the infinite loop test. |
Comments suppressed due to low confidence (2)
tests/test_app.py:987
- [nitpick] The addition of a timeout test for the infinite loop is a good safety measure. Consider expanding test cases to cover other combinations of --add commands if applicable.
@mark.timeout(1)
tests/test_app.py:191
- The expected line count was updated from 29 to 21. Please confirm that this change accurately reflects the intended fix for the never ending loop.
assert line_num_output == 21
Wineh
reviewed
May 20, 2025
| """ | ||
| results = [] | ||
| log = [] | ||
| processed_lines = set() |
Contributor
There was a problem hiding this comment.
I like the unique qualities of set
Contributor
|
Tested with 600MB wordlist: ✔️ |
Wineh
approved these changes
May 20, 2025
This file contains hidden or 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
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.
When running with multiple --add commands, the code could cause the run in a never ending loop. Solved this by keeping track of what was already ran.