Xuehai Pan
775788f93b
[BE][PYFMT] migrate PYFMT for test/[i-z]*/ to ruff format ( #144556 )
...
Pull Request resolved: https://github.com/pytorch/pytorch/pull/144556
Approved by: https://github.com/ezyang
2025-07-29 03:26:09 +00:00
Anthony Barbier
bf7e290854
Add __main__ guards to jit tests ( #154725 )
...
This PR is part of a series attempting to re-submit https://github.com/pytorch/pytorch/pull/134592 as smaller PRs.
In jit tests:
- Add and use a common raise_on_run_directly method for when a user runs a test file directly which should not be run this way. Print the file which the user should have run.
- Raise a RuntimeError on tests which have been disabled (not run)
Pull Request resolved: https://github.com/pytorch/pytorch/pull/154725
Approved by: https://github.com/clee2000
2025-06-16 10:28:45 +00:00
PyTorch MergeBot
20912673a6
Revert "Add __main__ guards to jit tests ( #154725 )"
...
This reverts commit 1a55fb0ee8 .
Reverted https://github.com/pytorch/pytorch/pull/154725 on behalf of https://github.com/malfet due to This added 2nd copy of raise_on_run to common_utils.py which caused lint failures, see https://github.com/pytorch/pytorch/actions/runs/15445374980/job/43473457466 ([comment](https://github.com/pytorch/pytorch/pull/154725#issuecomment-2940503905 ))
2025-06-04 15:42:52 +00:00
Anthony Barbier
1a55fb0ee8
Add __main__ guards to jit tests ( #154725 )
...
This PR is part of a series attempting to re-submit https://github.com/pytorch/pytorch/pull/134592 as smaller PRs.
In jit tests:
- Add and use a common raise_on_run_directly method for when a user runs a test file directly which should not be run this way. Print the file which the user should have run.
- Raise a RuntimeError on tests which have been disabled (not run)
Pull Request resolved: https://github.com/pytorch/pytorch/pull/154725
Approved by: https://github.com/Skylion007
2025-06-04 14:44:08 +00:00
Xuehai Pan
6ff1e43a41
[BE][Easy][13/19] enforce style for empty lines in import segments in test/j*/ ( #129764 )
...
See https://github.com/pytorch/pytorch/pull/129751#issue-2380881501 . Most changes are auto-generated by linter.
You can review these PRs via:
```bash
git diff --ignore-all-space --ignore-blank-lines HEAD~1
```
Pull Request resolved: https://github.com/pytorch/pytorch/pull/129764
Approved by: https://github.com/ezyang
2024-08-01 12:13:42 +00:00
Yuanhao Ji
604c9c5601
Enable UFMT on all of test/jit ( #123623 )
...
Partially addresses #123062
Ran lintrunner on:
- `test/jit`
with command:
```bash
lintrunner -a --take UFMT --all-files
```
Pull Request resolved: https://github.com/pytorch/pytorch/pull/123623
Approved by: https://github.com/ezyang
2024-04-11 23:45:05 +00:00
Jane Xu
09c7771e9c
Set test owners for jit tests ( #66808 )
...
Summary:
Action following https://github.com/pytorch/pytorch/issues/66232
Pull Request resolved: https://github.com/pytorch/pytorch/pull/66808
Reviewed By: mrshenli
Differential Revision: D31761414
Pulled By: janeyx99
fbshipit-source-id: baf8c49ff9c4bcda7b0ea0f6aafd26380586e72d
2021-10-25 07:51:10 -07:00
Nikitha Malgi
432df40d83
[Hackathon] Move python builtins to test_python_builtins.py ( #55479 )
...
Summary: Pull Request resolved: https://github.com/pytorch/pytorch/pull/55479
Test Plan: Imported from OSS
Reviewed By: pbelevich
Differential Revision: D27642098
Pulled By: nikithamalgifb
fbshipit-source-id: 8d92a7d0f6db63f3cc3f439cb75a8d809af9106d
2021-04-08 08:06:54 -07:00