Skip to content
Merged
Changes from 1 commit
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
Prev Previous commit
Next Next commit
remove orphan TODOs
  • Loading branch information
youknowone committed Jun 26, 2025
commit f0d9e1c7c9c99d97252b1b93fc6eef65443dfe11
15 changes: 0 additions & 15 deletions Lib/test/test_typing.py
Original file line number Diff line number Diff line change
Expand Up @@ -373,7 +373,6 @@ def test_alias(self):
self.assertEqual(get_args(alias_3), (LiteralString,))

class TypeVarTests(BaseTestCase):
# TODO: RUSTPYTHON
def test_basic_plain(self):
T = TypeVar('T')
# T equals itself.
Expand Down Expand Up @@ -403,7 +402,6 @@ def test_basic_with_exec(self):
self.assertIs(T.__infer_variance__, False)
self.assertIs(T.__module__, None)

# TODO: RUSTPYTHON
def test_attributes(self):
T_bound = TypeVar('T_bound', bound=int)
self.assertEqual(T_bound.__name__, 'T_bound')
Expand Down Expand Up @@ -445,7 +443,6 @@ def test_typevar_subclass_type_error(self):
with self.assertRaises(TypeError):
issubclass(T, int)

# TODO: RUSTPYTHON
def test_constrained_error(self):
with self.assertRaises(TypeError):
X = TypeVar('X', int)
Expand Down Expand Up @@ -478,7 +475,6 @@ def test_union_constrained(self):
A = TypeVar('A', str, bytes)
self.assertNotEqual(Union[A, str], Union[A])

# TODO: RUSTPYTHON
def test_repr(self):
self.assertEqual(repr(T), '~T')
self.assertEqual(repr(KT), '~KT')
Expand All @@ -493,7 +489,6 @@ def test_no_redefinition(self):
self.assertNotEqual(TypeVar('T'), TypeVar('T'))
self.assertNotEqual(TypeVar('T', int, str), TypeVar('T', int, str))

# TODO: RUSTPYTHON
def test_cannot_subclass(self):
with self.assertRaisesRegex(TypeError, NOT_A_BASE_TYPE % 'TypeVar'):
class V(TypeVar): pass
Expand Down Expand Up @@ -573,7 +568,6 @@ def test_many_weakrefs(self):
vals[x] = cls(str(x))
del vals

# TODO: RUSTPYTHON
def test_constructor(self):
T = TypeVar(name="T")
self.assertEqual(T.__name__, "T")
Expand Down Expand Up @@ -654,7 +648,6 @@ class X[T]: ...
self.assertIs(T.__default__, NoDefault)
self.assertFalse(T.has_default())

# TODO: RUSTPYTHON
def test_paramspec(self):
P = ParamSpec('P', default=(str, int))
self.assertEqual(P.__default__, (str, int))
Expand Down Expand Up @@ -682,7 +675,6 @@ class X[**P]: ...
self.assertIs(P.__default__, NoDefault)
self.assertFalse(P.has_default())

# TODO: RUSTPYTHON
def test_typevartuple(self):
Ts = TypeVarTuple('Ts', default=Unpack[Tuple[str, int]])
self.assertEqual(Ts.__default__, Unpack[Tuple[str, int]])
Expand Down Expand Up @@ -1284,14 +1276,12 @@ class Gen[*Ts]: ...

class TypeVarTupleTests(BaseTestCase):

# TODO: RUSTPYTHON
def test_name(self):
Ts = TypeVarTuple('Ts')
self.assertEqual(Ts.__name__, 'Ts')
Ts2 = TypeVarTuple('Ts2')
self.assertEqual(Ts2.__name__, 'Ts2')

# TODO: RUSTPYTHON
def test_module(self):
Ts = TypeVarTuple('Ts')
self.assertEqual(Ts.__module__, __name__)
Expand Down Expand Up @@ -4270,7 +4260,6 @@ class Node(Generic[T]): ...
self.assertEqual(t, copy(t))
self.assertEqual(t, deepcopy(t))

# TODO: RUSTPYTHON
def test_immutability_by_copy_and_pickle(self):
# Special forms like Union, Any, etc., generic aliases to containers like List,
# Mapping, etc., and type variabcles are considered immutable by copy and pickle.
Expand Down Expand Up @@ -8792,7 +8781,6 @@ def test_cannot_subscript(self):

class ParamSpecTests(BaseTestCase):

# TODO: RUSTPYTHON
def test_basic_plain(self):
P = ParamSpec('P')
self.assertEqual(P, P)
Expand Down Expand Up @@ -9000,7 +8988,6 @@ class Y(Generic[P, T]):
B = A[[int, str], bytes, float]
self.assertEqual(B.__args__, ((int, str,), Tuple[bytes, float]))

# TODO: RUSTPYTHON
def test_var_substitution(self):
P = ParamSpec("P")
subst = P.__typing_subst__
Expand All @@ -9011,7 +8998,6 @@ def test_var_substitution(self):
self.assertIs(subst(P), P)
self.assertEqual(subst(Concatenate[int, P]), Concatenate[int, P])

# TODO: RUSTPYTHON
def test_bad_var_substitution(self):
T = TypeVar('T')
P = ParamSpec('P')
Expand Down Expand Up @@ -9229,7 +9215,6 @@ def test_dir(self):
with self.subTest(required_item=required_item):
self.assertIn(required_item, dir_items)

# TODO: RUSTPYTHON
def test_valid_uses(self):
P = ParamSpec('P')
T = TypeVar('T')
Expand Down