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

Convert tests to unittest #68

Merged
merged 3 commits into from
Dec 30, 2022
Merged

Conversation

MichaelJFishman
Copy link
Contributor

Split out from #67 .

Copy link
Owner

@tomsilver tomsilver left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks so much @MichaelJFishman !

From the root of the repo, run

```sh
python -m unittest discover pddlgym/tests/
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

confirmed that this works as expected 👍

test_negative_preconditions()
test_zero_arity_negative_preconditions()

unittest.main()
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

add new line



class TestSearchAndRescue(unittest.TestCase):
def skip_test_searchandrescue(self, num_actions_to_test=10, verbose=False):
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

why is this skipped? oh, I guess we were skipping it already. fair enough!

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yup! The calling line was previously commented out. I figured you wanted the code present, but unused, and making this NOT start with test_ makes unittest skip it by default.



if __name__ == '__main__':
test_system()
unittest.main()
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

add new line

@tomsilver tomsilver merged commit cf9e005 into tomsilver:master Dec 30, 2022
aymeric75 pushed a commit to aymeric75/pddlgym that referenced this pull request May 22, 2024
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