summaryrefslogtreecommitdiffstats
path: root/Doc/howto/ipaddress.rst
diff options
context:
space:
mode:
Diffstat (limited to 'Doc/howto/ipaddress.rst')
-rw-r--r--Doc/howto/ipaddress.rst9
1 files changed, 4 insertions, 5 deletions
diff --git a/Doc/howto/ipaddress.rst b/Doc/howto/ipaddress.rst
index 5e0ff3e..452e367 100644
--- a/Doc/howto/ipaddress.rst
+++ b/Doc/howto/ipaddress.rst
@@ -1,3 +1,7 @@
+.. testsetup::
+
+ import ipaddress
+
.. _ipaddress-howto:
***************************************
@@ -49,11 +53,6 @@ to use the :func:`ipaddress.ip_address` factory function, which automatically
determines whether to create an IPv4 or IPv6 address based on the passed in
value:
-.. testsetup::
- >>> import ipaddress
-
-::
-
>>> ipaddress.ip_address('192.0.2.1')
IPv4Address('192.0.2.1')
>>> ipaddress.ip_address('2001:DB8::1')