From cd49f5495617a2c69c365cf44c7c659b8bb63f3b Mon Sep 17 00:00:00 2001 From: YAMAMOTO Takashi Date: Wed, 24 Jul 2013 13:04:38 +0900 Subject: [PATCH] addrconv: remove embedded test code Signed-off-by: YAMAMOTO Takashi Signed-off-by: FUJITA Tomonori --- ryu/lib/addrconv.py | 29 ----------------------------- 1 file changed, 29 deletions(-) diff --git a/ryu/lib/addrconv.py b/ryu/lib/addrconv.py index 512c1e59..76417501 100644 --- a/ryu/lib/addrconv.py +++ b/ryu/lib/addrconv.py @@ -1,5 +1,3 @@ -#!/usr/bin/env python -# # Copyright (C) 2013 Nippon Telegraph and Telephone Corporation. # Copyright (C) 2013 YAMAMOTO Takashi # @@ -40,30 +38,3 @@ class mac_mydialect(netaddr.mac_unix): word_fmt = '%.2x' mac = AddressConverter(netaddr.EUI, netaddr.strategy.eui48, version=48, dialect=mac_mydialect) - -if __name__ == '__main__': - def eq_(a, b): - if a != b: - print a - print b - - l = ['127.0.0.1', '255.255.0.0'] - conv = ipv4 - b2t = conv.bin_to_text - t2b = conv.text_to_bin - for a in l: - eq_(b2t(t2b(a)), a) - - l = ['ff02::1', 'fe80::f00b:a4ff:fe7d:f8ea', '::'] - conv = ipv6 - b2t = conv.bin_to_text - t2b = conv.text_to_bin - for a in l: - eq_(b2t(t2b(a)), a) - - l = ['f2:0b:a4:01:0a:23'] - conv = mac - b2t = conv.bin_to_text - t2b = conv.text_to_bin - for a in l: - eq_(b2t(t2b(a)), a)