Skip to content

Conversation

ysiraichi
Copy link
Collaborator

In summary, this PR:

  • Moves tests that checked error message of PyTorch operations into test_ops_error_message.py
  • Introduces expecttest as a dependency in requirements.in file
  • Introduces expecttest to those tests, so as to avoid copy-and-pasting error messages

The introduction of expecttest Python package was, in fact, implicit to our tests because of the following PyTorch testing library import:

from torch.testing._internal.common_device_type import dtypes

@ysiraichi ysiraichi force-pushed the ysiraichi/move-error-message-tests branch from 5922160 to ee84cdd Compare September 5, 2025 21:27
@ysiraichi ysiraichi force-pushed the ysiraichi/move-error-message-tests branch 2 times, most recently from 41a580d to d582be6 Compare September 10, 2025 14:07
@ysiraichi ysiraichi force-pushed the ysiraichi/move-error-message-tests branch from d582be6 to 298e5c4 Compare September 11, 2025 18:19
@ysiraichi ysiraichi merged commit c77852e into master Sep 11, 2025
24 checks passed
ysiraichi added a commit that referenced this pull request Sep 15, 2025
This PR fixes #9622, which extracted error messages checks out of
`test_operations.py` into `test_ops_error_message.py`. There were a few
problems with that PR, namely:

- `unittest.main()` wasn't being run: although calling `python -m
pytest` runs it automatically, running it without the `pytest` module
did nothing
- `onlyOnCPU()` would error if `PJRT_DEVICE` environment variable wasn't
set
- `test_ops_error_message.py` wasn't being run on CI

This PR fixes all the aforementioned PRs.
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