diff options
Diffstat (limited to 'Lib/test/test_ipaddress.py')
| -rw-r--r-- | Lib/test/test_ipaddress.py | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/Lib/test/test_ipaddress.py b/Lib/test/test_ipaddress.py index e985329..c217d36 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""" |
