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

Handle missing parent and invalid categories when adding locations and objects #144

Merged
merged 1 commit into from
Sep 6, 2023

Conversation

sea-bass
Copy link
Owner

@sea-bass sea-bass commented Sep 6, 2023

When writing tests, I noticed that there were some cases in World.add_location() and World.add_object() that would lead to uncaught exceptions. This was specifically:

  • Missing the parent input
  • Using a nonexistent category and thereby getting no metadata

I've added some guards to that, as well as unit tests in both the world creation and YAML loading tests.

@sea-bass sea-bass merged commit 89e385b into main Sep 6, 2023
6 checks passed
@sea-bass sea-bass deleted the handle-missing-parent-and-category branch September 6, 2023 13:40
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.

1 participant