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

Improve Inventory tests #32

Open
zomglings opened this issue Jan 21, 2023 · 0 comments
Open

Improve Inventory tests #32

zomglings opened this issue Jan 21, 2023 · 0 comments

Comments

@zomglings
Copy link
Collaborator

The test suite is a bit sparse compared to the functionality on the InventoryFacet. We elected to merge the existing codebase into main so that it would be easier for multiple parties to work on it at the same time, but we still need to go back and improve the tests.

More tests needed for equipping and unequipping behavior, especially multiple sequential operations on the same inventory slot.

Tests also need better documentation. game7ctl/game7ctl/test_inventory.py is 1771 line file currently and it is very difficult to navigate the tests. At the very least, the tests need to be greppable. A docstring at the beginning of each test describing what code the test exercises and how would go a long way. Here is an example of such documentation: https://github.com/bugout-dev/engine/blob/6f1d076c3bb95020c3f53ef2baee4a8ec36e5cc3/cli/enginecli/test_gofp.py#L2591

Even in that repo, these docstrings are not consistently applied - mostly because it is a lot of work to maintain them. But it is really important to do so.

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

No branches or pull requests

1 participant