Skip to content

Add a property based test for valid strategies#1374

Merged
marcharper merged 2 commits into1370from
add-property-based-test-for-meta-player
Sep 11, 2020
Merged

Add a property based test for valid strategies#1374
marcharper merged 2 commits into1370from
add-property-based-test-for-meta-player

Conversation

@drvinceknight
Copy link
Member

Not sure if this is overkill @marcharper, just thought it could be worth
having.

This is a PR to #1373

Not sure if this is overkill @marcharper, just thought it could be worth
having.
@marcharper
Copy link
Member

marcharper commented Sep 11, 2020

Want to move it to TestPlayer to run for all strategies? Or maybe update on of the existing tests there to also check that actions are valid?

(BTW this is the kind of thing that type hinting should catch...)

@drvinceknight
Copy link
Member Author

drvinceknight commented Sep 11, 2020

Want to move it to TestPlayer to run for all strategies? Or maybe update on of the existing tests there to also check that actions are valid?

I thought about that but thought that it would perhaps add a lot to the run time and given that we always have explicit test for the other players perhaps it wasn't needed? Could limit the turns I suppose...

(BTW this is the kind of thing that type hinting should catch...)

After a long journey (that is still interrupted with swearing at mypy) I am 100% on board with type hints :)

@marcharper
Copy link
Member

It's fine as is if you prefer

@drvinceknight
Copy link
Member Author

It's fine as is if you prefer

I suggest we leave as is but perhaps we open an issue to either specifically target type hinting the strategies strategy method or add a test like this?

@marcharper marcharper merged commit 138e0c9 into 1370 Sep 11, 2020
@marcharper marcharper deleted the add-property-based-test-for-meta-player branch July 3, 2022 18:03
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