-
Notifications
You must be signed in to change notification settings - Fork 26
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
[Quantum Chess] Improve test failure output #183
Conversation
9f1386d
to
0dc8143
Compare
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.
Test error message change looks good, but I think we should revert the formatting changes (or maybe put them in a separate PR) since they are not related to this change.
unitary/alpha/quantum_world.py
Outdated
] = new_world.get_object_by_name(value_obj.name) | ||
new_dict[new_world.get_object_by_name(key_obj.name)] = ( | ||
new_world.get_object_by_name(value_obj.name) | ||
) |
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.
What's up with all these formatting changes? Are you on the same version of black as everyone else?
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.
There is a CI check on this repo that fails if the formatting is not identical to that which whichever black version the workflow installs produces, so I had to add a formatting commit to make it pass.
In the meantime, Peter already hit the same issue and merged a commit making those formatting changes, so now I can remove mine.
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.
ok, perfect. I will merge this then.
=== Before === > assert all_in, print_samples(samples) E AssertionError: None E assert False test_utils.py:37: AssertionError ------------------------------------------------- Captured stdout call ------------------------------------------------- Using seed 2353196025 [211106778865792] {211106778865792, 211106242027648, 70369290510464, 211106778898560} ['h1', 'f2', 'g2', 'e3', 'h3', 'f4', 'g6', 'h6']: 476 ['h1', 'f2', 'g2', 'h2', 'e3', 'h3', 'f4', 'g6', 'h6']: 17 ['h1', 'f2', 'g2', 'h2', 'e3', 'h3', 'g6', 'h6']: 5 ['h1', 'f2', 'g2', 'e3', 'h3', 'f4', 'g6']: 2 === After === > assert all_in, message("Unexpected bitboard in samples") E AssertionError: Unexpected bitboard in samples E assert False test_utils.py:47: AssertionError ------------------------------------------------- Captured stdout call ------------------------------------------------- Using seed 3713866156 Expected bitboards: [f2 g2 h2 g3 d6 f7 g7 h7 b8 d8 h8] Sample distribution: 493 [f2 g2 h2 g3 d6 f7 g7 h7 b8 d8 h8] 7 [f2 g2 h2 g3 d6 f7 g7 h7 b8 h8]
See 2nd commit message for an example.