summaryrefslogtreecommitdiffstats
path: root/Lib
diff options
context:
space:
mode:
authorWindson yang <wiwindson@outlook.com>2019-04-22 18:45:34 (GMT)
committerSteve Dower <steve.dower@microsoft.com>2019-04-22 18:45:34 (GMT)
commitbe372d73b4c59026134a7e722ece34367c3bd3b6 (patch)
tree657e21afff0edf7ee0b572102823b8b1cdcded0f /Lib
parentd307d05350e26a7a5f8f74db9af632a15215b50f (diff)
downloadcpython-be372d73b4c59026134a7e722ece34367c3bd3b6.zip
cpython-be372d73b4c59026134a7e722ece34367c3bd3b6.tar.gz
cpython-be372d73b4c59026134a7e722ece34367c3bd3b6.tar.bz2
bpo-36678: Rename duplicate tests in test_dataclasses (GH-12899)
Diffstat (limited to 'Lib')
-rwxr-xr-xLib/test/test_dataclasses.py18
1 files changed, 3 insertions, 15 deletions
diff --git a/Lib/test/test_dataclasses.py b/Lib/test/test_dataclasses.py
index 9c83459..d320a96 100755
--- a/Lib/test/test_dataclasses.py
+++ b/Lib/test/test_dataclasses.py
@@ -697,7 +697,7 @@ class TestCase(unittest.TestCase):
y: int
self.assertNotEqual(Point(1, 3), C(1, 3))
- def test_not_tuple(self):
+ def test_not_other_dataclass(self):
# Test that some of the problems with namedtuple don't happen
# here.
@dataclass
@@ -1403,7 +1403,7 @@ class TestCase(unittest.TestCase):
self.assertEqual(asdict(gd), {'id': 0, 'users': {'first': {'name': 'Alice', 'id': 1},
'second': {'name': 'Bob', 'id': 2}}})
- def test_helper_asdict_builtin_containers(self):
+ def test_helper_asdict_builtin_object_containers(self):
@dataclass
class Child:
d: object
@@ -1576,7 +1576,7 @@ class TestCase(unittest.TestCase):
self.assertEqual(astuple(gt), (0, (('Alice', 1), ('Bob', 2))))
self.assertEqual(astuple(gd), (0, {'first': ('Alice', 1), 'second': ('Bob', 2)}))
- def test_helper_astuple_builtin_containers(self):
+ def test_helper_astuple_builtin_object_containers(self):
@dataclass
class Child:
d: object
@@ -3242,18 +3242,6 @@ class TestReplace(unittest.TestCase):
".<locals>.D(f=TestReplace.test_recursive_repr_indirection_two"
".<locals>.E(f=...)))")
- def test_recursive_repr_two_attrs(self):
- @dataclass
- class C:
- f: "C"
- g: "C"
-
- c = C(None, None)
- c.f = c
- c.g = c
- self.assertEqual(repr(c), "TestReplace.test_recursive_repr_two_attrs"
- ".<locals>.C(f=..., g=...)")
-
def test_recursive_repr_misc_attrs(self):
@dataclass
class C: