Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
43 changes: 43 additions & 0 deletions test/dynamo/cpython/3_13/test_bool.diff
Original file line number Diff line number Diff line change
@@ -0,0 +1,43 @@
diff --git a/test/dynamo/cpython/3_13/test_bool.py b/test/dynamo/cpython/3_13/test_bool.py
index 34ecb45f161..8989785eb75 100644
--- a/test/dynamo/cpython/3_13/test_bool.py
+++ b/test/dynamo/cpython/3_13/test_bool.py
@@ -1,3 +1,23 @@
+# ======= BEGIN Dynamo patch =======
+# Owner(s): ["module: dynamo"]
+
+# ruff: noqa
+# flake8: noqa
+
+# Test copied from
+# https://raw.githubusercontent.com/python/cpython/refs/tags/v3.13.5/Lib/test/test_bool.py
+
+import sys
+import torch
+import torch._dynamo.test_case
+import unittest
+from torch._dynamo.test_case import CPythonTestCase
+from torch.testing._internal.common_utils import run_tests
+
+__TestCase = CPythonTestCase
+
+# ======= END DYNAMO PATCH =======
+
# Test properties of bool promised by PEP 285

import unittest
@@ -5,7 +25,7 @@ from test.support import os_helper

import os

-class BoolTest(unittest.TestCase):
+class BoolTest(__TestCase):

def test_subclass(self):
try:
@@ -418,4 +438,4 @@ class BoolTest(unittest.TestCase):


if __name__ == "__main__":
- unittest.main()
+ run_tests()
Loading
Loading