Skip to content

Convert tests to unittest - #68

Merged
tomsilver merged 3 commits into
tomsilver:masterfrom
MichaelJFishman:unittest
Dec 30, 2022
Merged

Convert tests to unittest#68
tomsilver merged 3 commits into
tomsilver:masterfrom
MichaelJFishman:unittest

Conversation

@MichaelJFishman

Copy link
Copy Markdown
Contributor

Split out from #67 .

@tomsilver tomsilver left a comment

Copy link
Copy Markdown
Owner

Choose a reason for hiding this comment

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

Thanks so much @MichaelJFishman !

Comment thread README.md
From the root of the repo, run

```sh
python -m unittest discover pddlgym/tests/

Copy link
Copy Markdown
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 👍

Comment thread pddlgym/tests/test_inference.py Outdated
test_negative_preconditions()
test_zero_arity_negative_preconditions()

unittest.main() No newline at end of file

Copy link
Copy Markdown
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
Copy Markdown
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
Copy Markdown
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.

Comment thread pddlgym/tests/test_system.py Outdated

if __name__ == '__main__':
test_system()
unittest.main() No newline at end of file

Copy link
Copy Markdown
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