-
Notifications
You must be signed in to change notification settings - Fork 60
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
Conversation
There was a problem hiding this 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/ |
There was a problem hiding this comment.
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 👍
pddlgym/tests/test_inference.py
Outdated
test_negative_preconditions() | ||
test_zero_arity_negative_preconditions() | ||
|
||
unittest.main() |
There was a problem hiding this comment.
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): |
There was a problem hiding this comment.
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!
There was a problem hiding this comment.
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.
pddlgym/tests/test_system.py
Outdated
|
||
|
||
if __name__ == '__main__': | ||
test_system() | ||
unittest.main() |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
add new line
Convert tests to unittest
Split out from #67 .