From 88f64f392c8fe8cb41322c2ea14483fa0c567eaa Mon Sep 17 00:00:00 2001 From: Serhiy Storchaka Date: Sat, 7 Mar 2015 20:08:34 +0200 Subject: Issue #23103: Reduced the memory consumption of IPv4Address and IPv6Address. --- Lib/test/test_ipaddress.py | 7 +++++++ 1 file changed, 7 insertions(+) (limited to 'Lib/test/test_ipaddress.py') diff --git a/Lib/test/test_ipaddress.py b/Lib/test/test_ipaddress.py index e985329117..c217d36922 100644 --- a/Lib/test/test_ipaddress.py +++ b/Lib/test/test_ipaddress.py @@ -11,6 +11,7 @@ import functools import operator import pickle import ipaddress +import weakref class BaseTestCase(unittest.TestCase): @@ -259,6 +260,9 @@ class AddressTestCase_v4(BaseTestCase, CommonTestMixin_v4): def test_pickle(self): self.pickle_test('192.0.2.1') + def test_weakref(self): + weakref.ref(self.factory('192.0.2.1')) + class AddressTestCase_v6(BaseTestCase, CommonTestMixin_v6): factory = ipaddress.IPv6Address @@ -394,6 +398,9 @@ class AddressTestCase_v6(BaseTestCase, CommonTestMixin_v6): def test_pickle(self): self.pickle_test('2001:db8::') + def test_weakref(self): + weakref.ref(self.factory('2001:db8::')) + class NetmaskTestMixin_v4(CommonTestMixin_v4): """Input validation on interfaces and networks is very similar""" -- cgit v1.2.1