generated from readthedocs/tutorial-template
-
Notifications
You must be signed in to change notification settings - Fork 5
tests: add edge cases unitests for Path class #102
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
Open
wilhelmagren
wants to merge
4
commits into
FalkorDB:main
Choose a base branch
from
wilhelmagren:tests/improve-coverage
base: main
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
Changes from 1 commit
Commits
Show all changes
4 commits
Select commit
Hold shift + click to select a range
860ad70
tests: add edge cases unitests for path class
wilhelmagren 58da1d1
Merge branch 'main' into tests/improve-coverage
gkorland 6835d65
Merge branch 'main' into tests/improve-coverage
gkorland 9bc94a5
Merge branch 'main' into tests/improve-coverage
gkorland File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
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
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 was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
💡 Verification agent
🧩 Analysis chain
Verify the expected string representation format.
The test checks for a specific string format, but I can't verify if it matches the actual implementation without seeing the Path class's
__str__
method. Ensure that the hardcoded string "<(node1)-(edge1)->(node2)>" matches how nodes and edges are actually represented when converted to strings.🏁 Script executed:
Length of output: 425
I want to confirm the full
__str__
logic to ensure the test’s expected output matches exactly. Let's dump the entire method:🏁 Script executed:
Length of output: 864
I’d like to verify how nodes and edges are set up in the test (their IDs and types). Dumping the relevant portion of tests/test_path.py:
🏁 Script executed:
sed -n '1,200p' tests/test_path.py
Length of output: 1712
I’d like to inspect how
Node.id
andEdge.id
are defined to confirm the string formatting. Dump the class definitions:🏁 Script executed:
Length of output: 3375
Let’s inspect the
__str__
implementations for both Node and Edge to confirm how they format IDs and aliases:🏁 Script executed:
Length of output: 1409
To confirm how equality and the edge’s
__str__
tail behave, let’s dump any__eq__
methods and the rest of theEdge.__str__
implementation:🏁 Script executed:
Length of output: 1925
Mismatch between test’s expected format and Path.str implementation
The
Path.__str__
method builds its output using the numericid
values and square brackets around edge IDs, e.g."<(1)-[1]->(2)>"
However, the test asserts:
– which doesn’t align with the implementation.
Please update the test in
tests/test_path.py
accordingly: