Skip to content

Commit 0decd96

Browse files
Revert "Fixes for CPython int/float tests (#155978)"
This reverts commit 216bd60. Reverted #155978 on behalf of https://github.com/huydhn due to Some tests are still failing in trunk ([comment](#155978 (comment)))
1 parent 7c51619 commit 0decd96

File tree

61 files changed

+13
-55
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

61 files changed

+13
-55
lines changed

test/dynamo/cpython/3_13/test_int.diff

Lines changed: 4 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
diff --git a/test/dynamo/cpython/3_13/test_int.py b/test/dynamo/cpython/3_13/test_int.py
2-
index 48825f46911..4ab200372ea 100644
2+
index 48825f46911..ac7aeacbc01 100644
33
--- a/test/dynamo/cpython/3_13/test_int.py
44
+++ b/test/dynamo/cpython/3_13/test_int.py
55
@@ -1,13 +1,137 @@
@@ -153,15 +153,7 @@ index 48825f46911..4ab200372ea 100644
153153

154154
def test_basic(self):
155155
self.assertEqual(int(314), 314)
156-
@@ -566,6 +690,7 @@ class IntTestCases(unittest.TestCase):
157-
self.assertEqual(n, 1)
158-
self.assertIs(type(n), IntSubclass)
159-
160-
+ @skipIfTorchDynamo("flaky under dynamo")
161-
def test_error_message(self):
162-
def check(s, base=None):
163-
with self.assertRaises(ValueError,
164-
@@ -607,7 +732,7 @@ class IntTestCases(unittest.TestCase):
156+
@@ -607,7 +731,7 @@ class IntTestCases(unittest.TestCase):
165157
self.assertEqual(int('1_2_3_4_5_6_7', 32), 1144132807)
166158

167159

@@ -170,7 +162,7 @@ index 48825f46911..4ab200372ea 100644
170162

171163
int_class = int # Override this in subclasses to reuse the suite.
172164

173-
@@ -818,7 +943,7 @@ class IntSubclassStrDigitLimitsTests(IntStrDigitLimitsTests):
165+
@@ -818,7 +942,7 @@ class IntSubclassStrDigitLimitsTests(IntStrDigitLimitsTests):
174166
int_class = IntSubclass
175167

176168

@@ -179,7 +171,7 @@ index 48825f46911..4ab200372ea 100644
179171
# Tests of the functions in _pylong.py. Those get used when the
180172
# number of digits in the input values are large enough.
181173

182-
@@ -922,4 +1047,4 @@ class PyLongModuleTests(unittest.TestCase):
174+
@@ -922,4 +1046,4 @@ class PyLongModuleTests(unittest.TestCase):
183175
bits <<= 1
184176

185177
if __name__ == "__main__":

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

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@
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 run_tests, skipIfTorchDynamo
12+
from torch.testing._internal.common_utils import run_tests
1313

1414
__TestCase = CPythonTestCase
1515

@@ -690,7 +690,6 @@ def __trunc__(self):
690690
self.assertEqual(n, 1)
691691
self.assertIs(type(n), IntSubclass)
692692

693-
@skipIfTorchDynamo("flaky under dynamo")
694693
def test_error_message(self):
695694
def check(s, base=None):
696695
with self.assertRaises(ValueError,

test/dynamo_expected_failures/CPython313-test_complex-ComplexTest.test_truediv_zero_division

Whitespace-only changes.

test/dynamo_expected_failures/CPython313-test_dict-DictTest.test_empty_presized_dict_in_freelist

Whitespace-only changes.

test/dynamo_expected_failures/CPython313-test_dict-DictTest.test_reverse_iterator_for_empty_dict

Whitespace-only changes.

test/dynamo_expected_failures/CPython313-test_float-GeneralFloatCases.test_float_ceil

Whitespace-only changes.

test/dynamo_expected_failures/CPython313-test_float-GeneralFloatCases.test_float_floor

Whitespace-only changes.

test/dynamo_expected_failures/CPython313-test_float-GeneralFloatCases.test_float_mod

Whitespace-only changes.

test/dynamo_expected_failures/CPython313-test_float-GeneralFloatCases.test_float_pow

Whitespace-only changes.

test/dynamo_expected_failures/CPython313-test_float-InfNanTest.test_inf_from_str

Whitespace-only changes.

0 commit comments

Comments
 (0)
pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy