-
Notifications
You must be signed in to change notification settings - Fork 97
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
False positives when using assert_almost_eq() #239
Comments
It looks like we missed some edge cases when testing vectors. It seems Godot is only using the
I'm going to remove the In this case, you are comparing positions so you would probably have to use |
Possible changes for
|
why not compare x and y individually under the table?
|
I also don't think length is the correct solution either since |
Will now compare each individual component of Vector2 and Vector3 for equality.
I've sent a pull request to what I think is the simplest solution, a direct comparison of each component of Vector2 or Vector3. It works correctly on my end |
Also re
I believe |
Hey @db0 , shouldn't you put the PR on this repo? :) |
@astrale-sharp , you mean #240? |
Fixed in 7.2.0, thx db0 |
I have noticed that my tests are working when they should be failing.
[Passed]: [Vector2(565, 600)] expected to equal [Vector2(565, 640)] +/- [(2, 2)]: Check card placed in correct global position
I have done various attempts to make it fail, but the only thing that worked was switching to
assert_eq()
or reducing the "jitter" to something like 0.0001.You can download this branch of my project and replicate it on your end as well: https://github.com/db0/godot-card-gaming/tree/ControlNodeHand
I've left test_card_draw.gd with a test that should fail in test_single_card_draw()
The text was updated successfully, but these errors were encountered: