8000 Update · pytorch/pytorch@5cb25de · GitHub
[go: up one dir, main page]

Skip to content

Commit 5cb25de

Browse files
Update
[ghstack-poisoned]
2 parents 3444714 + ea24f2b commit 5cb25de

19 files changed

+56
-151
lines changed

test/dynamo/cpython/3_13/list_tests.py

Lines changed: 2 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -9,15 +9,9 @@
99
import torch._dynamo.test_case
1010
import unittest
1111
from torch._dynamo.test_case import CPythonTestCase
12-
from torch.testing._internal.common_utils import (
13-
TEST_WITH_TORCHDYNAMO,
14-
run_tests,
15-
)
12+
from torch.testing._internal.common_utils import run_tests
1613

17-
if TEST_WITH_TORCHDYNAMO:
18-
__TestCase = CPythonTestCase
19-
else:
20-
__TestCase = unittest.TestCase
14+
__TestCase = CPythonTestCase
2115

2216
# redirect import statements
2317
import sys

test/dynamo/cpython/3_13/mapping_tests.py

Lines changed: 3 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -9,15 +9,10 @@
99
import torch._dynamo.test_case
1010
import unittest
1111
from torch._dynamo.test_case import CPythonTestCase
12-
from torch.testing._internal.common_utils import (
13-
TEST_WITH_TORCHDYNAMO,
14-
run_tests,
15-
)
12+
from torch.testing._internal.common_utils import run_tests
13+
14+
__TestCase = CPythonTestCase
1615

17-
if TEST_WITH_TORCHDYNAMO:
18-
__TestCase = CPythonTestCase
19-
else:
20-
__TestCase = unittest.TestCase
2116

2217
# redirect import statements
2318
import sys

test/dynamo/cpython/3_13/seq_tests.py

Lines changed: 3 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -9,15 +9,10 @@
99
import torch._dynamo.test_case
1010
import unittest
1111
from torch._dynamo.test_case import CPythonTestCase
12-
from torch.testing._internal.common_utils import (
13-
TEST_WITH_TORCHDYNAMO,
14-
run_tests,
15-
)
12+
from torch.testing._internal.common_utils import run_tests
13+
14+
__TestCase = CPythonTestCase
1615

17-
if TEST_WITH_TORCHDYNAMO:
18-
__TestCase = CPythonTestCase
19-
else:
20-
__TestCase = unittest.TestCase
2116

2217
# redirect import statements
2318
import sys

test/dynamo/cpython/3_13/string_tests.py

Lines changed: 2 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -9,15 +9,9 @@
99
import torch._dynamo.test_case
1010
import unittest
1111
from torch._dynamo.test_case import CPythonTestCase
12-
from torch.testing._internal.common_utils import (
13-
TEST_WITH_TORCHDYNAMO,
14-
run_tests,
15-
)
12+
from torch.testing._internal.common_utils import run_tests
1613

17-
if TEST_WITH_TORCHDYNAMO:
18-
__TestCase = CPythonTestCase
19-
else:
20-
__TestCase = unittest.TestCase
14+
__TestCase = CPythonTestCase
2115

2216
# redirect import statements
2317
import sys

test/dynamo/cpython/3_13/test_baseexception.py

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -9,13 +9,11 @@
99
import torch._dynamo.test_case
1010
import unittest
1111
from torch._dynamo.test_case import CPythonTestCase
12-
from torch.testing._internal.common_utils import (
13-
TEST_WITH_TORCHDYNAMO,
14-
run_tests,
15-
)
12+
from torch.testing._internal.common_utils import run_tests
1613

1714
__TestCase = CPythonTestCase
1815

16+
1917
# redirect import statements
2018
import sys
2119
import importlib.abc

test/dynamo/cpython/3_13/test_cmath.py

Lines changed: 4 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -9,15 +9,10 @@
99
import torch._dynamo.test_case
1010
import unittest
1111
from torch._dynamo.test_case import CPythonTestCase
12-
from torch.testing._internal.common_utils import (
13-
TEST_WITH_TORCHDYNAMO,
14-
run_tests,
15-
)
12+
from torch.testing._internal.common_utils import run_tests
13+
14+
__TestCase = CPythonTestCase
1615

17-
if TEST_WITH_TORCHDYNAMO:
18-
__TestCase = CPythonTestCase
19-
else:
20-
__TestCase = unittest.TestCase
2116

2217
# redirect import statements
2318
import sys
@@ -678,7 +673,4 @@ def test_complex_special(self):
678673

679674

680675
if __name__ == "__main__":
681-
if TEST_WITH_TORCHDYNAMO:
682-
run_tests()
683-
else:
684-
unittest.main()
676+
run_tests()

test/dynamo/cpython/3_13/test_dict.py

Lines changed: 3 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -10,15 +10,12 @@
1010
import unittest
1111
from torch._dynamo.test_case import CPythonTestCase
1212
from torch.testing._internal.common_utils import (
13-
TEST_WITH_TORCHDYNAMO,
1413
run_tests,
1514
xfailIfTorchDynamo,
1615
)
1716

18-
if TEST_WITH_TORCHDYNAMO:
19-
__TestCase = CPythonTestCase
20-
else:
21-
__TestCase = unittest.TestCase
17+
__TestCase = CPythonTestCase
18+
2219

2320
# redirect import statements
2421
import sys
@@ -1679,7 +1676,4 @@ class SubclassMappingTests(mapping_tests.BasicTestMappingProtocol):
16791676

16801677

16811678
if __name__ == "__main__":
1682-
if TEST_WITH_TORCHDYNAMO:
1683-
run_tests()
1684-
else:
1685-
unittest.main()
1679+
run_tests()

test/dynamo/cpython/3_13/test_exception_variations.py

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,6 @@
1010
import unittest
1111
from torch._dynamo.test_case import CPythonTestCase
1212
from torch.testing._internal.common_utils import (
13-
TEST_WITH_TORCHDYNAMO,
1413
run_tests,
1514
xfailIfTorchDynamo,
1615
)

test/dynamo/cpython/3_13/test_exceptions.py

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,6 @@
1010
import unittest
1111
from torch._dynamo.test_case import CPythonTestCase
1212
from torch.testing._internal.common_utils import (
13-
TEST_WITH_TORCHDYNAMO,
1413
run_tests,
1514
xfailIfTorchDynamo,
1615
)

test/dynamo/cpython/3_13/test_grammar.py

Lines changed: 4 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -10,15 +10,13 @@
1010
import unittest
1111
from torch._dynamo.test_case import CPythonTestCase
1212
from torch.testing._internal.common_utils import (
13-
TEST_WITH_TORCHDYNAMO,
1413
run_tests,
1514
xfailIfTorchDynamo,
1615
)
1716

18-
if TEST_WITH_TORCHDYNAMO:
19-
__TestCase = CPythonTestCase
20-
else:
21-
__TestCase = unittest.TestCase
17+
18+
__TestCase = CPythonTestCase
19+
2220

2321
# redirect import statements
2422
import sys
@@ -2066,7 +2064,4 @@ async def foo():
20662064

20672065

20682066
if __name__ == "__main__":
2069-
if TEST_WITH_TORCHDYNAMO:
2070-
run_tests()
2071-
else:
2072-
unittest.main()
2067+
run_tests()

0 commit comments

Comments
 (0)
0