Skip to content
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

Merged
merged 2 commits into from
Mar 21, 2024

Conversation

losos0
Copy link
Collaborator

@losos0 losos0 commented Feb 27, 2024

See 2nd commit message for an example.

@losos0 losos0 force-pushed the testoutput branch 2 times, most recently from 9f1386d to 0dc8143 Compare February 29, 2024 05:32
Copy link
Collaborator

@dstrain115 dstrain115 left a 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.

] = 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)
)
Copy link
Collaborator

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?

Copy link
Collaborator Author

@losos0 losos0 Mar 20, 2024

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.

Copy link
Collaborator

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.

losos0 added 2 commits March 20, 2024 17:56
=== 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]
@dstrain115 dstrain115 merged commit cdb03c9 into quantumlib:main Mar 21, 2024
6 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants