Skip to content

Conversation

@lukebaumann
Copy link
Collaborator

Based on etils GitHub Action.

References tests that are not currently in the repository.


# Run tests
- name: Run core tests
run: python -m unittest
Copy link
Collaborator

Choose a reason for hiding this comment

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

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Using absl.testing.absltest. googletest is the C++ testing framework.

@lukebaumann lukebaumann force-pushed the lukebaumann-patch-2 branch 3 times, most recently from d06d6ce to 9b09904 Compare October 22, 2024 19:06
Based on [etils GitHub Action](https://github.com/google/etils/blob/main/.github/workflows/pytest_and_autopublish.yml).

References tests that are not currently in the repository.

# Run tests
- name: Run core tests
run: python -m unittest discover --pattern "*_test.py" --start-directory "pathwaysutils/test"
Copy link
Collaborator

Choose a reason for hiding this comment

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

Does this call into absl test? Asking since it's using unittest.

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

abseil/abseil-py#138

abseil doesn't have special logic for test discovery. Since absl.testing.absltest is built on top of unittest, if you just use absl.testing.absltest.TestCase over unittest.TestCase in your code, python -m unittest would also work.

Apparently fails if we are making use of some absl flags which we are not doing.

@lukebaumann lukebaumann merged commit a0f9f15 into main Oct 22, 2024
5 checks passed
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.

3 participants