2
2
3
3
import unittest
4
4
from test import support
5
- from test .test_grammar import (VALID_UNDERSCORE_LITERALS ,
6
- INVALID_UNDERSCORE_LITERALS )
5
+ # from test.test_grammar import (VALID_UNDERSCORE_LITERALS,
6
+ # INVALID_UNDERSCORE_LITERALS)
7
7
8
8
L = [
9
9
('0' , 0 ),
@@ -31,6 +31,7 @@ class IntSubclass(int):
31
31
32
32
class IntTestCases (unittest .TestCase ):
33
33
34
+ @unittest .skip ("TODO: RUSTPYTHON" )
34
35
def test_basic (self ):
35
36
self .assertEqual (int (314 ), 314 )
36
37
self .assertEqual (int (3.14 ), 3 )
@@ -214,6 +215,7 @@ def test_basic(self):
214
215
self .assertEqual (int ('2br45qc' , 35 ), 4294967297 )
215
216
self .assertEqual (int ('1z141z5' , 36 ), 4294967297 )
216
217
218
+ @unittest .skip ("TODO: RUSTPYTHON" )
217
219
def test_underscores (self ):
218
220
for lit in VALID_UNDERSCORE_LITERALS :
219
221
if any (ch in lit for ch in '.eEjJ' ):
@@ -278,6 +280,7 @@ def test_int_base_bad_types(self):
278
280
with self .assertRaises (TypeError ):
279
281
int ('0' , 5.0 )
280
282
283
+ @unittest .skip ("TODO: RUSTPYTHON" )
281
284
def test_int_base_indexable (self ):
282
285
class MyIndexable (object ):
283
286
def __init__ (self , value ):
@@ -295,6 +298,7 @@ def __index__(self):
295
298
self .assertEqual (int ('101' , base = MyIndexable (10 )), 101 )
296
299
self .assertEqual (int ('101' , base = MyIndexable (36 )), 1 + 36 ** 2 )
297
300
301
+ @unittest .skip ("TODO: RUSTPYTHON" )
298
302
def test_non_numeric_input_types (self ):
299
303
# Test possible non-numeric types for the argument x, including
300
304
# subclasses of the explicitly documented accepted types.
@@ -340,6 +344,7 @@ def test_int_memoryview(self):
340
344
def test_string_float (self ):
341
345
self .assertRaises (ValueError , int , '1.2' )
342
346
347
+ @unittest .skip ("TODO: RUSTPYTHON" )
343
348
def test_intconversion (self ):
344
349
# Test __int__()
345
350
class ClassicMissingMethods :
@@ -433,6 +438,8 @@ def __int__(self):
433
438
434
439
self .assertRaises (TypeError , int , BadInt ())
435
440
441
+ # TODO: RUSTPYTHON
442
+ @unittest .expectedFailure
436
443
def test_int_returns_int_subclass (self ):
437
444
class BadInt :
438
445
def __int__ (self ):
@@ -476,6 +483,8 @@ def __trunc__(self):
476
483
self .assertEqual (n , 1 )
477
484
self .assertIs (type (n ), IntSubclass )
478
485
486
+ # TODO: RUSTPYTHON
487
+ @unittest .expectedFailure
479
488
def test_error_message (self ):
480
489
def check (s , base = None ):
481
490
with self .assertRaises (ValueError ,
0 commit comments