From 60eb261c7f67c6a91dc213bd680dd01d0b075510 Mon Sep 17 00:00:00 2001 From: Peter Moody Date: Thu, 29 Apr 2010 17:15:43 +0000 Subject: + one more address_exclude cleanup, to make sure network/address exclusions fail as expected. git-svn-id: https://ipaddr-py.googlecode.com/svn/trunk@163 09200d28-7f98-11dd-ad27-0f66e57d2035 --- ipaddr_test.py | 2 ++ 1 file changed, 2 insertions(+) (limited to 'ipaddr_test.py') diff --git a/ipaddr_test.py b/ipaddr_test.py index 04cf8d9..8d14940 100755 --- a/ipaddr_test.py +++ b/ipaddr_test.py @@ -788,10 +788,12 @@ class IpaddrUnitTest(unittest.TestCase): addr1 = ipaddr.IPNetwork('10.1.1.0/24') addr2 = ipaddr.IPNetwork('10.1.1.0/26') addr3 = ipaddr.IPNetwork('10.2.1.0/24') + addr4 = ipaddr.IPAddress('10.1.1.0') self.assertEqual(addr1.address_exclude(addr2), [ipaddr.IPNetwork('10.1.1.64/26'), ipaddr.IPNetwork('10.1.1.128/25')]) self.assertRaises(ValueError, addr1.address_exclude, addr3) + self.assertRaises(TypeError, addr1.address_exclude, addr4) self.assertEqual(addr1.address_exclude(addr1), []) def testHash(self): -- cgit v1.2.1