Skip to content
Merged
Show file tree
Hide file tree
Changes from 4 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
1 change: 1 addition & 0 deletions .cspell.dict/python-more.txt
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@ basicsize
bdfl
bigcharset
bignum
bivariant
breakpointhook
cformat
chunksize
Expand Down
14 changes: 0 additions & 14 deletions Lib/test/test_typing.py
Original file line number Diff line number Diff line change
Expand Up @@ -464,8 +464,6 @@ def test_union_unique(self):
self.assertEqual(Union[X, int].__parameters__, (X,))
self.assertIs(Union[X, int].__origin__, Union)

# TODO: RUSTPYTHON
@unittest.expectedFailure
def test_or(self):
X = TypeVar('X')
# use a string because str doesn't implement
Expand Down Expand Up @@ -657,7 +655,6 @@ class X[T]: ...
self.assertFalse(T.has_default())

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

# TODO: RUSTPYTHON
@unittest.expectedFailure
def test_typevartuple(self):
Ts = TypeVarTuple('Ts', default=Unpack[Tuple[str, int]])
self.assertEqual(Ts.__default__, Unpack[Tuple[str, int]])
Expand Down Expand Up @@ -1289,15 +1285,13 @@ class Gen[*Ts]: ...
class TypeVarTupleTests(BaseTestCase):

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

# TODO: RUSTPYTHON
@unittest.expectedFailure
def test_module(self):
Ts = TypeVarTuple('Ts')
self.assertEqual(Ts.__module__, __name__)
Expand Down Expand Up @@ -2050,7 +2044,6 @@ class TypeVarTuplePicklingTests(BaseTestCase):
# statements at the start of each test.

# TODO: RUSTPYTHON
@unittest.expectedFailure
@all_pickle_protocols
def test_pickling_then_unpickling_results_in_same_identity(self, proto):
global global_Ts1 # See explanation at start of class.
Expand Down Expand Up @@ -4278,7 +4271,6 @@ class Node(Generic[T]): ...
self.assertEqual(t, deepcopy(t))

# TODO: RUSTPYTHON
@unittest.expectedFailure
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 @@ -8801,7 +8793,6 @@ def test_cannot_subscript(self):
class ParamSpecTests(BaseTestCase):

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

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

# TODO: RUSTPYTHON
@unittest.expectedFailure
def test_bad_var_substitution(self):
T = TypeVar('T')
P = ParamSpec('P')
Expand Down Expand Up @@ -9241,7 +9230,6 @@ def test_dir(self):
self.assertIn(required_item, dir_items)

# TODO: RUSTPYTHON
@unittest.expectedFailure
def test_valid_uses(self):
P = ParamSpec('P')
T = TypeVar('T')
Expand Down Expand Up @@ -9719,8 +9707,6 @@ def test_constructor(self):
with self.assertRaises(TypeError):
type(NoDefault)(1)

# TODO: RUSTPYTHON
@unittest.expectedFailure
def test_repr(self):
self.assertEqual(repr(NoDefault), 'typing.NoDefault')

Expand Down
2 changes: 1 addition & 1 deletion vm/src/frame.rs
Original file line number Diff line number Diff line change
Expand Up @@ -1282,7 +1282,7 @@ impl ExecutingFrame<'_> {
bytecode::Instruction::TypeVarTuple => {
let type_var_tuple_name = self.pop_value();
let type_var_tuple: PyObjectRef =
_typing::make_typevartuple(type_var_tuple_name.clone())
_typing::make_typevartuple(type_var_tuple_name.clone(), vm)
.into_ref(&vm.ctx)
.into();
self.push_value(type_var_tuple);
Expand Down
Loading