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
mark failing tests from test_copy.py
  • Loading branch information
youknowone committed Jan 31, 2020
commit c8e5040d355e0f427a334b266b8670025aa611fa
41 changes: 41 additions & 0 deletions Lib/test/test_copy.py
Original file line number Diff line number Diff line change
Expand Up @@ -64,6 +64,8 @@ def __reduce__(self):
self.assertIs(y, x)
self.assertEqual(c, [1])

# TODO: RUSTPYTHON
@unittest.expectedFailure
def test_copy_reduce(self):
class C(object):
def __reduce__(self):
Expand Down Expand Up @@ -205,6 +207,8 @@ def __eq__(self, other):
self.assertIsNot(y, x)
self.assertEqual(y.foo, x.foo)

# TODO: RUSTPYTHON
@unittest.expectedFailure
def test_copy_inst_getnewargs_ex(self):
class C(int):
def __new__(cls, *, foo):
Expand Down Expand Up @@ -326,6 +330,8 @@ def __reduce__(self):
self.assertIs(y, x)
self.assertEqual(c, [1])

# TODO: RUSTPYTHON
@unittest.expectedFailure
def test_deepcopy_reduce(self):
class C(object):
def __reduce__(self):
Expand Down Expand Up @@ -368,6 +374,7 @@ def test_deepcopy_list(self):
self.assertIsNot(x, y)
self.assertIsNot(x[0], y[0])

@unittest.skip("TODO: RUSTPYTHON")
def test_deepcopy_reflexive_list(self):
x = []
x.append(x)
Expand Down Expand Up @@ -395,6 +402,7 @@ def test_deepcopy_tuple_of_immutables(self):
y = copy.deepcopy(x)
self.assertIs(x, y)

@unittest.skip("TODO: RUSTPYTHON")
def test_deepcopy_reflexive_tuple(self):
x = ([],)
x[0].append(x)
Expand All @@ -412,6 +420,7 @@ def test_deepcopy_dict(self):
self.assertIsNot(x, y)
self.assertIsNot(x["foo"], y["foo"])

@unittest.skip("TODO: RUSTPYTHON")
def test_deepcopy_reflexive_dict(self):
x = {}
x['foo'] = x
Expand Down Expand Up @@ -502,6 +511,8 @@ def __eq__(self, other):
self.assertEqual(y.foo, x.foo)
self.assertIsNot(y.foo, x.foo)

# TODO: RUSTPYTHON
@unittest.expectedFailure
def test_deepcopy_inst_getnewargs_ex(self):
class C(int):
def __new__(cls, *, foo):
Expand Down Expand Up @@ -579,6 +590,8 @@ class C:
self.assertIsNot(y, x)
self.assertIs(y.foo, y)

# TODO: RUSTPYTHON
@unittest.expectedFailure
def test_deepcopy_range(self):
class I(int):
pass
Expand All @@ -592,6 +605,8 @@ class I(int):

# _reconstruct()

# TODO: RUSTPYTHON
@unittest.expectedFailure
def test_reconstruct_string(self):
class C(object):
def __reduce__(self):
Expand All @@ -602,6 +617,8 @@ def __reduce__(self):
y = copy.deepcopy(x)
self.assertIs(y, x)

# TODO: RUSTPYTHON
@unittest.expectedFailure
def test_reconstruct_nostate(self):
class C(object):
def __reduce__(self):
Expand All @@ -613,6 +630,8 @@ def __reduce__(self):
y = copy.deepcopy(x)
self.assertIs(y.__class__, x.__class__)

# TODO: RUSTPYTHON
@unittest.expectedFailure
def test_reconstruct_state(self):
class C(object):
def __reduce__(self):
Expand All @@ -627,6 +646,8 @@ def __eq__(self, other):
self.assertEqual(y, x)
self.assertIsNot(y.foo, x.foo)

# TODO: RUSTPYTHON
@unittest.expectedFailure
def test_reconstruct_state_setstate(self):
class C(object):
def __reduce__(self):
Expand Down Expand Up @@ -654,6 +675,8 @@ class C(object):

# Additions for Python 2.3 and pickle protocol 2

# TODO: RUSTPYTHON
@unittest.expectedFailure
def test_reduce_4tuple(self):
class C(list):
def __reduce__(self):
Expand All @@ -671,6 +694,8 @@ def __eq__(self, other):
self.assertIsNot(x, y)
self.assertIsNot(x[0], y[0])

# TODO: RUSTPYTHON
@unittest.expectedFailure
def test_reduce_5tuple(self):
class C(dict):
def __reduce__(self):
Expand Down Expand Up @@ -705,6 +730,8 @@ class C(object):
self.assertEqual(x.foo, y.foo)
self.assertIsNot(x.foo, y.foo)

# TODO: RUSTPYTHON
@unittest.expectedFailure
def test_deepcopy_dict_subclass(self):
class C(dict):
def __init__(self, d=None):
Expand Down Expand Up @@ -747,6 +774,8 @@ class C(list):
self.assertIsNot(x[0], y[0])
self.assertIsNot(x.foo, y.foo)

# TODO: RUSTPYTHON
@unittest.expectedFailure
def test_copy_tuple_subclass(self):
class C(tuple):
pass
Expand All @@ -755,6 +784,8 @@ class C(tuple):
y = copy.copy(x)
self.assertEqual(tuple(y), (1, 2, 3))

# TODO: RUSTPYTHON
@unittest.expectedFailure
def test_deepcopy_tuple_subclass(self):
class C(tuple):
pass
Expand Down Expand Up @@ -822,12 +853,18 @@ class C(object):
v[x] = y
self.assertNotIn(x, u)

# TODO: RUSTPYTHON
@unittest.expectedFailure
def test_copy_weakkeydict(self):
self._check_copy_weakdict(weakref.WeakKeyDictionary)

# TODO: RUSTPYTHON
@unittest.expectedFailure
def test_copy_weakvaluedict(self):
self._check_copy_weakdict(weakref.WeakValueDictionary)

# TODO: RUSTPYTHON
@unittest.expectedFailure
def test_deepcopy_weakkeydict(self):
class C(object):
def __init__(self, i):
Expand All @@ -847,6 +884,8 @@ def __init__(self, i):
del c
self.assertEqual(len(v), 1)

# TODO: RUSTPYTHON
@unittest.expectedFailure
def test_deepcopy_weakvaluedict(self):
class C(object):
def __init__(self, i):
Expand All @@ -870,6 +909,8 @@ def __init__(self, i):
del d
self.assertEqual(len(v), 1)

# TODO: RUSTPYTHON
@unittest.expectedFailure
def test_deepcopy_bound_method(self):
class Foo(object):
def m(self):
Expand Down