aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/Lib/test/test_dataclasses/__init__.py
diff options
context:
space:
mode:
Diffstat (limited to 'Lib/test/test_dataclasses/__init__.py')
-rw-r--r--Lib/test/test_dataclasses/__init__.py11
1 files changed, 11 insertions, 0 deletions
diff --git a/Lib/test/test_dataclasses/__init__.py b/Lib/test/test_dataclasses/__init__.py
index ede74b0dd15..e27abac5111 100644
--- a/Lib/test/test_dataclasses/__init__.py
+++ b/Lib/test/test_dataclasses/__init__.py
@@ -3498,6 +3498,17 @@ class TestSlots(unittest.TestCase):
self.assertIs(a.__weakref__, a_ref)
+ def test_dataclass_derived_weakref_slot(self):
+ class A:
+ pass
+
+ @dataclass(slots=True, weakref_slot=True)
+ class B(A):
+ pass
+
+ B()
+
+
class TestDescriptors(unittest.TestCase):
def test_set_name(self):
# See bpo-33141.