Skip to content

back to SWE-Agent summary

SWE-Agent: dnspython

Pytest Summary for test tests

status count
failed 152
passed 27
total 179
collected 179

Failed pytests:

test_address.py::IPv4Tests::test_invalid

test_address.py::IPv4Tests::test_invalid
self = 

    def test_invalid(self):
        invalid = (
            "",
            ".",
            "..",
            "400.2.3.4",
            "260.2.3.4",
            "256.2.3.4",
            "1.256.3.4",
            "1.2.256.4",
            "1.2.3.256",
            "300.2.3.4",
            "1.300.3.4",
            "1.2.300.4",
            "1.2.3.300",
            "900.2.3.4",
            "1.900.3.4",
            "1.2.900.4",
            "1.2.3.900",
            "300.300.300.300",
            "3000.30.30.30",
            "255Z255X255Y255",
            "192x168.1.26",
            "2.3.4",
            "257.1.2.3",
            "00.00.00.00",
            "000.000.000.000",
            "256.256.256.256",
            "255255.255.255",
            "255.255255.255",
            "255.255.255255",
            "1...",
            "1.2..",
            "1.2.3.",
            ".2..",
            ".2.3.",
            ".2.3.4",
            "..3.",
            "..3.4",
            "...4",
            ".1.2.3.4",
            "1.2.3.4.",
            " 1.2.3.4",
            "1.2.3.4 ",
            " 1.2.3.4 ",
            "::",
        )
        for s in invalid:
>           with self.assertRaises(
                dns.exception.SyntaxError, msg=f'invalid IPv4 address: "{s}"'
            ):
E           AssertionError: SyntaxError not raised : invalid IPv4 address: ""

tests/test_address.py:77: AssertionError

test_address.py::IPv4Tests::test_valid

test_address.py::IPv4Tests::test_valid
self = 

    def test_valid(self):
        valid = (
            "1.2.3.4",
            "11.22.33.44",
            "254.7.237.98",
            "192.168.1.26",
            "192.168.1.1",
            "13.1.68.3",
            "129.144.52.38",
            "254.157.241.86",
            "12.34.56.78",
            "192.0.2.128",
        )
        for s in valid:
>           self.assertEqual(dns.ipv4.inet_aton(s), socket.inet_pton(socket.AF_INET, s))
E           AssertionError: None != b'\x01\x02\x03\x04'

tests/test_address.py:27: AssertionError

test_address.py::IPv6Tests::test_invalid

test_address.py::IPv6Tests::test_invalid
self = 

    def test_invalid(self):
        invalid = (
            "",
            ":",
            ":::",
            "2001:DB8:0:0:8:800:200C:417A:221",
            "FF01::101::2",
            "02001:0000:1234:0000:0000:C1C0:ABCD:0876",
            "2001:0000:1234:0000:00001:C1C0:ABCD:0876",
            " 2001:0000:1234:0000:0000:C1C0:ABCD:0876",
            "2001:0000:1234:0000:0000:C1C0:ABCD:0876 ",
            " 2001:0000:1234:0000:0000:C1C0:ABCD:0876  ",
            "2001:0000:1234:0000:0000:C1C0:ABCD:0876  0",
            "2001:0000:1234: 0000:0000:C1C0:ABCD:0876",
            "3ffe:0b00:0000:0001:0000:0000:000a",
            "FF02:0000:0000:0000:0000:0000:0000:0000:0001",
            "3ffe:b00::1::a",
            "::1111:2222:3333:4444:5555:6666::",
            "1:2:3::4:5::7:8",
            "12345::6:7:8",
            "1::5:400.2.3.4",
            "1::5:260.2.3.4",
            "1::5:256.2.3.4",
            "1::5:1.256.3.4",
            "1::5:1.2.256.4",
            "1::5:1.2.3.256",
            "1::5:300.2.3.4",
            "1::5:1.300.3.4",
            "1::5:1.2.300.4",
            "1::5:1.2.3.300",
            "1::5:900.2.3.4",
            "1::5:1.900.3.4",
            "1::5:1.2.900.4",
            "1::5:1.2.3.900",
            "1::5:300.300.300.300",
            "1::5:3000.30.30.30",
            "1::400.2.3.4",
            "1::260.2.3.4",
            "1::256.2.3.4",
            "1::1.256.3.4",
            "1::1.2.256.4",
            "1::1.2.3.256",
            "1::300.2.3.4",
            "1::1.300.3.4",
            "1::1.2.300.4",
            "1::1.2.3.300",
            "1::900.2.3.4",
            "1::1.900.3.4",
            "1::1.2.900.4",
            "1::1.2.3.900",
            "1::300.300.300.300",
            "1::3000.30.30.30",
            "::400.2.3.4",
            "::260.2.3.4",
            "::256.2.3.4",
            "::1.256.3.4",
            "::1.2.256.4",
            "::1.2.3.256",
            "::300.2.3.4",
            "::1.300.3.4",
            "::1.2.300.4",
            "::1.2.3.300",
            "::900.2.3.4",
            "::1.900.3.4",
            "::1.2.900.4",
            "::1.2.3.900",
            "::300.300.300.300",
            "::3000.30.30.30",
            "::1.2.3.4.",
            "2001:1:1:1:1:1:255Z255X255Y255",
            "::ffff:192x168.1.26",
            "::ffff:2.3.4",
            "::ffff:257.1.2.3",
            "1.2.3.4",
            "1.2.3.4:1111:2222:3333:4444::5555",
            "1.2.3.4:1111:2222:3333::5555",
            "1.2.3.4:1111:2222::5555",
            "1.2.3.4:1111::5555",
            "1.2.3.4::5555",
            "1.2.3.4::",
            "fe80:0000:0000:0000:0204:61ff:254.157.241.086",
            "XXXX:XXXX:XXXX:XXXX:XXXX:XXXX:1.2.3.4",
            "1111:2222:3333:4444:5555:6666:00.00.00.00",
            "1111:2222:3333:4444:5555:6666:000.000.000.000",
            "1111:2222:3333:4444:5555:6666:256.256.256.256",
            "1111:2222:3333:4444::5555:",
            "1111:2222:3333::5555:",
            "1111:2222::5555:",
            "1111::5555:",
            "::5555:",
            "1111:",
            ":1111:2222:3333:4444::5555",
            ":1111:2222:3333::5555",
            ":1111:2222::5555",
            ":1111::5555",
            ":::5555",
            "123",
            "ldkfj",
            "2001::FFD3::57ab",
            "2001:db8:85a3::8a2e:37023:7334",
            "2001:db8:85a3::8a2e:370k:7334",
            "1:2:3:4:5:6:7:8:9",
            "1::2::3",
            "1:::3:4:5",
            "1:2:3::4:5:6:7:8:9",
            "XXXX:XXXX:XXXX:XXXX:XXXX:XXXX:XXXX:XXXX",
            "1111:2222:3333:4444:5555:6666:7777:8888:9999",
            "1111:2222:3333:4444:5555:6666:7777:8888::",
            "::2222:3333:4444:5555:6666:7777:8888:9999",
            "1111:2222:3333:4444:5555:6666:7777",
            "1111:2222:3333:4444:5555:6666",
            "1111:2222:3333:4444:5555",
            "1111:2222:3333:4444",
            "1111:2222:3333",
            "1111:2222",
            "1111",
            "11112222:3333:4444:5555:6666:7777:8888",
            "1111:22223333:4444:5555:6666:7777:8888",
            "1111:2222:33334444:5555:6666:7777:8888",
            "1111:2222:3333:44445555:6666:7777:8888",
            "1111:2222:3333:4444:55556666:7777:8888",
            "1111:2222:3333:4444:5555:66667777:8888",
            "1111:2222:3333:4444:5555:6666:77778888",
            "1111:2222:3333:4444:5555:6666:7777:8888:",
            "1111:2222:3333:4444:5555:6666:7777:",
            "1111:2222:3333:4444:5555:6666:",
            "1111:2222:3333:4444:5555:",
            "1111:2222:3333:4444:",
            "1111:2222:3333:",
            "1111:2222:",
            ":8888",
            ":7777:8888",
            ":6666:7777:8888",
            ":5555:6666:7777:8888",
            ":4444:5555:6666:7777:8888",
            ":3333:4444:5555:6666:7777:8888",
            ":2222:3333:4444:5555:6666:7777:8888",
            ":1111:2222:3333:4444:5555:6666:7777:8888",
            ":::2222:3333:4444:5555:6666:7777:8888",
            "1111:::3333:4444:5555:6666:7777:8888",
            "1111:2222:::4444:5555:6666:7777:8888",
            "1111:2222:3333:::5555:6666:7777:8888",
            "1111:2222:3333:4444:::6666:7777:8888",
            "1111:2222:3333:4444:5555:::7777:8888",
            "1111:2222:3333:4444:5555:6666:::8888",
            "::2222::4444:5555:6666:7777:8888",
            "::2222:3333::5555:6666:7777:8888",
            "::2222:3333:4444::6666:7777:8888",
            "::2222:3333:4444:5555::7777:8888",
            "::2222:3333:4444:5555:7777::8888",
            "::2222:3333:4444:5555:7777:8888::",
            "1111::3333::5555:6666:7777:8888",
            "1111::3333:4444::6666:7777:8888",
            "1111::3333:4444:5555::7777:8888",
            "1111::3333:4444:5555:6666::8888",
            "1111::3333:4444:5555:6666:7777::",
            "1111:2222::4444::6666:7777:8888",
            "1111:2222::4444:5555::7777:8888",
            "1111:2222::4444:5555:6666::8888",
            "1111:2222::4444:5555:6666:7777::",
            "1111:2222:3333::5555::7777:8888",
            "1111:2222:3333::5555:6666::8888",
            "1111:2222:3333::5555:6666:7777::",
            "1111:2222:3333:4444::6666::8888",
            "1111:2222:3333:4444::6666:7777::",
            "1111:2222:3333:4444:5555::7777::",
            "1111:2222:3333:4444:5555:6666:7777:8888:1.2.3.4",
            "1111:2222:3333:4444:5555:6666:7777:1.2.3.4",
            "1111:2222:3333:4444:5555:6666::1.2.3.4",
            "::2222:3333:4444:5555:6666:7777:1.2.3.4",
            "1111:2222:3333:4444:5555:6666:1.2.3.4.5",
            "1111:2222:3333:4444:5555:1.2.3.4",
            "1111:2222:3333:4444:1.2.3.4",
            "1111:2222:3333:1.2.3.4",
            "1111:2222:1.2.3.4",
            "1111:1.2.3.4",
            "11112222:3333:4444:5555:6666:1.2.3.4",
            "1111:22223333:4444:5555:6666:1.2.3.4",
            "1111:2222:33334444:5555:6666:1.2.3.4",
            "1111:2222:3333:44445555:6666:1.2.3.4",
            "1111:2222:3333:4444:55556666:1.2.3.4",
            "1111:2222:3333:4444:5555:66661.2.3.4",
            "1111:2222:3333:4444:5555:6666:255255.255.255",
            "1111:2222:3333:4444:5555:6666:255.255255.255",
            "1111:2222:3333:4444:5555:6666:255.255.255255",
            ":1.2.3.4",
            ":6666:1.2.3.4",
            ":5555:6666:1.2.3.4",
            ":4444:5555:6666:1.2.3.4",
            ":3333:4444:5555:6666:1.2.3.4",
            ":2222:3333:4444:5555:6666:1.2.3.4",
            ":1111:2222:3333:4444:5555:6666:1.2.3.4",
            ":::2222:3333:4444:5555:6666:1.2.3.4",
            "1111:::3333:4444:5555:6666:1.2.3.4",
            "1111:2222:::4444:5555:6666:1.2.3.4",
            "1111:2222:3333:::5555:6666:1.2.3.4",
            "1111:2222:3333:4444:::6666:1.2.3.4",
            "1111:2222:3333:4444:5555:::1.2.3.4",
            "::2222::4444:5555:6666:1.2.3.4",
            "::2222:3333::5555:6666:1.2.3.4",
            "::2222:3333:4444::6666:1.2.3.4",
            "::2222:3333:4444:5555::1.2.3.4",
            "1111::3333::5555:6666:1.2.3.4",
            "1111::3333:4444::6666:1.2.3.4",
            "1111::3333:4444:5555::1.2.3.4",
            "1111:2222::4444::6666:1.2.3.4",
            "1111:2222::4444:5555::1.2.3.4",
            "1111:2222:3333::5555::1.2.3.4",
            "::.",
            "::..",
            "::...",
            "::1...",
            "::1.2..",
            "::1.2.3.",
            "::.2..",
            "::.2.3.",
            "::.2.3.4",
            "::..3.",
            "::..3.4",
            "::...4",
            ":1111:2222:3333:4444:5555:6666:7777::",
            ":1111:2222:3333:4444:5555:6666::",
            ":1111:2222:3333:4444:5555::",
            ":1111:2222:3333:4444::",
            ":1111:2222:3333::",
            ":1111:2222::",
            ":1111::",
            ":1111:2222:3333:4444:5555:6666::8888",
            ":1111:2222:3333:4444:5555::8888",
            ":1111:2222:3333:4444::8888",
            ":1111:2222:3333::8888",
            ":1111:2222::8888",
            ":1111::8888",
            ":::8888",
            ":1111:2222:3333:4444:5555::7777:8888",
            ":1111:2222:3333:4444::7777:8888",
            ":1111:2222:3333::7777:8888",
            ":1111:2222::7777:8888",
            ":1111::7777:8888",
            ":::7777:8888",
            ":1111:2222:3333:4444::6666:7777:8888",
            ":1111:2222:3333::6666:7777:8888",
            ":1111:2222::6666:7777:8888",
            ":1111::6666:7777:8888",
            ":::6666:7777:8888",
            ":1111:2222:3333::5555:6666:7777:8888",
            ":1111:2222::5555:6666:7777:8888",
            ":1111::5555:6666:7777:8888",
            ":::5555:6666:7777:8888",
            ":1111:2222::4444:5555:6666:7777:8888",
            ":1111::4444:5555:6666:7777:8888",
            ":::4444:5555:6666:7777:8888",
            ":1111::3333:4444:5555:6666:7777:8888",
            ":::3333:4444:5555:6666:7777:8888",
            ":1111:2222:3333:4444:5555::1.2.3.4",
            ":1111:2222:3333:4444::1.2.3.4",
            ":1111:2222:3333::1.2.3.4",
            ":1111:2222::1.2.3.4",
            ":1111::1.2.3.4",
            ":::1.2.3.4",
            ":1111:2222:3333:4444::6666:1.2.3.4",
            ":1111:2222:3333::6666:1.2.3.4",
            ":1111:2222::6666:1.2.3.4",
            ":1111::6666:1.2.3.4",
            ":::6666:1.2.3.4",
            ":1111:2222:3333::5555:6666:1.2.3.4",
            ":1111:2222::5555:6666:1.2.3.4",
            ":1111::5555:6666:1.2.3.4",
            ":::5555:6666:1.2.3.4",
            ":1111:2222::4444:5555:6666:1.2.3.4",
            ":1111::4444:5555:6666:1.2.3.4",
            ":::4444:5555:6666:1.2.3.4",
            ":1111::3333:4444:5555:6666:1.2.3.4",
            "1111:2222:3333:4444:5555:6666:7777:::",
            "1111:2222:3333:4444:5555:6666:::",
            "1111:2222:3333:4444:5555:::",
            "1111:2222:3333:4444:::",
            "1111:2222:3333:::",
            "1111:2222:::",
            "1111:::",
            "1111:2222:3333:4444:5555:6666::8888:",
            "1111:2222:3333:4444:5555::8888:",
            "1111:2222:3333:4444::8888:",
            "1111:2222:3333::8888:",
            "1111:2222::8888:",
            "1111::8888:",
            "::8888:",
            "1111:2222:3333:4444:5555::7777:8888:",
            "1111:2222:3333:4444::7777:8888:",
            "1111:2222:3333::7777:8888:",
            "1111:2222::7777:8888:",
            "1111::7777:8888:",
            "::7777:8888:",
            "1111:2222:3333:4444::6666:7777:8888:",
            "1111:2222:3333::6666:7777:8888:",
            "1111:2222::6666:7777:8888:",
            "1111::6666:7777:8888:",
            "::6666:7777:8888:",
            "1111:2222:3333::5555:6666:7777:8888:",
            "1111:2222::5555:6666:7777:8888:",
            "1111::5555:6666:7777:8888:",
            "::5555:6666:7777:8888:",
            "1111:2222::4444:5555:6666:7777:8888:",
            "1111::4444:5555:6666:7777:8888:",
            "::4444:5555:6666:7777:8888:",
            "1111::3333:4444:5555:6666:7777:8888:",
            "::3333:4444:5555:6666:7777:8888:",
            "::2222:3333:4444:5555:6666:7777:8888:",
            "':10.0.0.1",
        )
        for s in invalid:
>           with self.assertRaises(
                dns.exception.SyntaxError, msg=f'invalid IPv6 address: "{s}"'
            ):
E           AssertionError: SyntaxError not raised : invalid IPv6 address: ""

tests/test_address.py:582: AssertionError

test_address.py::IPv6Tests::test_valid

test_address.py::IPv6Tests::test_valid
self = 

    def test_valid(self):
        valid = (
            "::1",
            "::",
            "0:0:0:0:0:0:0:1",
            "0:0:0:0:0:0:0:0",
            "2001:DB8:0:0:8:800:200C:417A",
            "FF01:0:0:0:0:0:0:101",
            "2001:DB8::8:800:200C:417A",
            "FF01::101",
            "fe80::217:f2ff:fe07:ed62",
            "2001:0000:1234:0000:0000:C1C0:ABCD:0876",
            "3ffe:0b00:0000:0000:0001:0000:0000:000a",
            "FF02:0000:0000:0000:0000:0000:0000:0001",
            "0000:0000:0000:0000:0000:0000:0000:0001",
            "0000:0000:0000:0000:0000:0000:0000:0000",
            "2::10",
            "ff02::1",
            "fe80::",
            "2002::",
            "2001:db8::",
            "2001:0db8:1234::",
            "::ffff:0:0",
            "1:2:3:4:5:6:7:8",
            "1:2:3:4:5:6::8",
            "1:2:3:4:5::8",
            "1:2:3:4::8",
            "1:2:3::8",
            "1:2::8",
            "1::8",
            "1::2:3:4:5:6:7",
            "1::2:3:4:5:6",
            "1::2:3:4:5",
            "1::2:3:4",
            "1::2:3",
            "::2:3:4:5:6:7:8",
            "::2:3:4:5:6:7",
            "::2:3:4:5:6",
            "::2:3:4:5",
            "::2:3:4",
            "::2:3",
            "::8",
            "1:2:3:4:5:6::",
            "1:2:3:4:5::",
            "1:2:3:4::",
            "1:2:3::",
            "1:2::",
            "1::",
            "1:2:3:4:5::7:8",
            "1:2:3:4::7:8",
            "1:2:3::7:8",
            "1:2::7:8",
            "1::7:8",
            "1:2:3:4:5:6:1.2.3.4",
            "1:2:3:4:5::1.2.3.4",
            "1:2:3:4::1.2.3.4",
            "1:2:3::1.2.3.4",
            "1:2::1.2.3.4",
            "1::1.2.3.4",
            "1:2:3:4::5:1.2.3.4",
            "1:2:3::5:1.2.3.4",
            "1:2:3::5:1.2.3.4",
            "1:2::5:1.2.3.4",
            "1::5:1.2.3.4",
            "1::5:11.22.33.44",
            "fe80::217:f2ff:254.7.237.98",
            "::ffff:192.168.1.26",
            "::ffff:192.168.1.1",
            "0:0:0:0:0:0:13.1.68.3",
            "0:0:0:0:0:FFFF:129.144.52.38",
            "::13.1.68.3",
            "::FFFF:129.144.52.38",
            "fe80:0:0:0:204:61ff:254.157.241.86",
            "fe80::204:61ff:254.157.241.86",
            "::ffff:12.34.56.78",
            "::ffff:192.0.2.128",
            "fe80:0000:0000:0000:0204:61ff:fe9d:f156",
            "fe80:0:0:0:204:61ff:fe9d:f156",
            "fe80::204:61ff:fe9d:f156",
            "fe80::1",
            "::ffff:c000:280",
            "2001:0db8:85a3:0000:0000:8a2e:0370:7334",
            "2001:db8:85a3:0:0:8a2e:370:7334",
            "2001:db8:85a3::8a2e:370:7334",
            "2001:0db8:0000:0000:0000:0000:1428:57ab",
            "2001:0db8:0000:0000:0000::1428:57ab",
            "2001:0db8:0:0:0:0:1428:57ab",
            "2001:0db8:0:0::1428:57ab",
            "2001:0db8::1428:57ab",
            "2001:db8::1428:57ab",
            "::ffff:0c22:384e",
            "2001:0db8:1234:0000:0000:0000:0000:0000",
            "2001:0db8:1234:ffff:ffff:ffff:ffff:ffff",
            "2001:db8:a::123",
            "1111:2222:3333:4444:5555:6666:7777:8888",
            "1111:2222:3333:4444:5555:6666:7777::",
            "1111:2222:3333:4444:5555:6666::",
            "1111:2222:3333:4444:5555::",
            "1111:2222:3333:4444::",
            "1111:2222:3333::",
            "1111:2222::",
            "1111::",
            "1111:2222:3333:4444:5555:6666::8888",
            "1111:2222:3333:4444:5555::8888",
            "1111:2222:3333:4444::8888",
            "1111:2222:3333::8888",
            "1111:2222::8888",
            "1111::8888",
            "::8888",
            "1111:2222:3333:4444:5555::7777:8888",
            "1111:2222:3333:4444::7777:8888",
            "1111:2222:3333::7777:8888",
            "1111:2222::7777:8888",
            "1111::7777:8888",
            "::7777:8888",
            "1111:2222:3333:4444::6666:7777:8888",
            "1111:2222:3333::6666:7777:8888",
            "1111:2222::6666:7777:8888",
            "1111::6666:7777:8888",
            "::6666:7777:8888",
            "1111:2222:3333::5555:6666:7777:8888",
            "1111:2222::5555:6666:7777:8888",
            "1111::5555:6666:7777:8888",
            "::5555:6666:7777:8888",
            "1111:2222::4444:5555:6666:7777:8888",
            "1111::4444:5555:6666:7777:8888",
            "::4444:5555:6666:7777:8888",
            "1111::3333:4444:5555:6666:7777:8888",
            "::3333:4444:5555:6666:7777:8888",
            "::2222:3333:4444:5555:6666:7777:8888",
            "1111:2222:3333:4444:5555:6666:123.123.123.123",
            "1111:2222:3333:4444:5555::123.123.123.123",
            "1111:2222:3333:4444::123.123.123.123",
            "1111:2222:3333::123.123.123.123",
            "1111:2222::123.123.123.123",
            "1111::123.123.123.123",
            "::123.123.123.123",
            "1111:2222:3333:4444::6666:123.123.123.123",
            "1111:2222:3333::6666:123.123.123.123",
            "1111:2222::6666:123.123.123.123",
            "1111::6666:123.123.123.123",
            "::6666:123.123.123.123",
            "1111:2222:3333::5555:6666:123.123.123.123",
            "1111:2222::5555:6666:123.123.123.123",
            "1111::5555:6666:123.123.123.123",
            "::5555:6666:123.123.123.123",
            "1111:2222::4444:5555:6666:123.123.123.123",
            "1111::4444:5555:6666:123.123.123.123",
            "::4444:5555:6666:123.123.123.123",
            "1111::3333:4444:5555:6666:123.123.123.123",
            "::2222:3333:4444:5555:6666:123.123.123.123",
            "::0:0:0:0:0:0:0",
            "::0:0:0:0:0:0",
            "::0:0:0:0:0",
            "::0:0:0:0",
            "::0:0:0",
            "::0:0",
            "::0",
            "0:0:0:0:0:0:0::",
            "0:0:0:0:0:0::",
            "0:0:0:0:0::",
            "0:0:0:0::",
            "0:0:0::",
            "0:0::",
            "0::",
            "0:a:b:c:d:e:f::",
            "::0:a:b:c:d:e:f",
            "a:b:c:d:e:f:0::",
        )

        win32_invalid = {
            "::2:3:4:5:6:7:8",
            "::2222:3333:4444:5555:6666:7777:8888",
            "::2222:3333:4444:5555:6666:123.123.123.123",
            "::0:0:0:0:0:0:0",
            "::0:a:b:c:d:e:f",
        }

        for s in valid:
            if sys.platform == "win32" and s in win32_invalid:
                # socket.inet_pton() on win32 rejects some valid (as
                # far as we can tell) IPv6 addresses.  Skip them.
                continue
>           self.assertEqual(
                dns.ipv6.inet_aton(s), socket.inet_pton(socket.AF_INET6, s)
            )
E           AssertionError: None != b'\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x01'

tests/test_address.py:267: AssertionError

test_entropy.py::EntropyTestCase::test_functions

test_entropy.py::EntropyTestCase::test_functions
self = 

    def test_functions(self):
>       v = dns.entropy.random_16()
E       AttributeError: module 'dns.entropy' has no attribute 'random_16'. Did you mean: 'random'?

tests/test_entropy.py:41: AttributeError

test_entropy.py::EntropyTestCase::test_pool

test_entropy.py::EntropyTestCase::test_pool
self = 

    def test_pool(self):
>       pool = dns.entropy.EntropyPool(b"seed-value")

tests/test_entropy.py:12: 
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 

self = , seed = b'seed-value'

    def __init__(self, seed: Optional[bytes]=None):
        self.pool_index = 0
        self.digest: Optional[bytearray] = None
        self.next_byte = 0
        self.lock = threading.Lock()
        self.hash = hashlib.sha1()
        self.hash_len = 20
        self.pool = bytearray(b'\x00' * self.hash_len)
        if seed is not None:
>           self._stir(seed)
E           AttributeError: 'EntropyPool' object has no attribute '_stir'

dns/entropy.py:19: AttributeError

test_entropy.py::EntropyTestCase::test_pool_random

test_entropy.py::EntropyTestCase::test_pool_random
self = 

    def test_pool_random(self):
        pool = dns.entropy.EntropyPool()
>       values = {pool.random_32() for n in range(12)}
E       AttributeError: 'EntropyPool' object has no attribute 'random_32'

tests/test_entropy.py:22: AttributeError

test_entropy.py::EntropyTestCase::test_pool_random_between

test_entropy.py::EntropyTestCase::test_pool_random_between
self = 

    def test_pool_random_between(self):
        pool = dns.entropy.EntropyPool()

        def bad():
            pool.random_between(0, 4294967296)

>       self.assertRaises(ValueError, bad)

tests/test_entropy.py:32: 
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 

    def bad():
>       pool.random_between(0, 4294967296)
E       AttributeError: 'EntropyPool' object has no attribute 'random_between'

tests/test_entropy.py:30: AttributeError

test_entropy.py::EntropyForcePoolTestCase::test_functions

test_entropy.py::EntropyForcePoolTestCase::test_functions
self = 

    def test_functions(self):
>       v = dns.entropy.random_16()
E       AttributeError: module 'dns.entropy' has no attribute 'random_16'. Did you mean: 'random'?

tests/test_entropy.py:56: AttributeError

test_exceptions.py::ExceptionTestCase::test_formatted_error

test_exceptions.py::ExceptionTestCase::test_formatted_error
self = 

    def test_formatted_error(self):
        """Exceptions with explicit format has to respect it."""
        params = {"parameter": "value"}
        try:
>           raise FormatedError(**params)

tests/test_exceptions.py:46: 
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 

self = FormatedError(), args = (), kwargs = {'parameter': 'value'}

    def __init__(self, *args, **kwargs):
        self._check_params(*args, **kwargs)
        if kwargs:
>           self.kwargs = self._check_kwargs(**kwargs)
E           AttributeError: 'FormatedError' object has no attribute '_check_kwargs'. Did you mean: '_check_params'?

dns/exception.py:37: AttributeError

test_exceptions.py::ExceptionTestCase::test_kwargs_only

test_exceptions.py::ExceptionTestCase::test_kwargs_only
self = 

    def test_kwargs_only(self):
        """Kwargs cannot be combined with args."""
        with self.assertRaises(AssertionError):
>           raise FormatedError(1, a=2)

tests/test_exceptions.py:54: 
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 

    def __init__(self, *args, **kwargs):
        self._check_params(*args, **kwargs)
        if kwargs:
>           self.kwargs = self._check_kwargs(**kwargs)
E           AttributeError: 'FormatedError' object has no attribute '_check_kwargs'. Did you mean: '_check_params'?

dns/exception.py:37: AttributeError

test_exceptions.py::ExceptionTestCase::test_kwargs_unsupported

test_exceptions.py::ExceptionTestCase::test_kwargs_unsupported
self = 

    def test_kwargs_unsupported(self):
        """Only supported kwargs are accepted."""
        with self.assertRaises(AssertionError):
>           raise FormatedError(unsupported=2)

tests/test_exceptions.py:59: 
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 

    def __init__(self, *args, **kwargs):
        self._check_params(*args, **kwargs)
        if kwargs:
>           self.kwargs = self._check_kwargs(**kwargs)
E           AttributeError: 'FormatedError' object has no attribute '_check_kwargs'. Did you mean: '_check_params'?

dns/exception.py:37: AttributeError

test_flags.py::FlagsTestCase::test_flags1

test_flags.py::FlagsTestCase::test_flags1
self = 

    def test_flags1(self):
>       self.assertEqual(
            dns.flags.from_text("RA RD AA QR"),
            dns.flags.QR | dns.flags.AA | dns.flags.RD | dns.flags.RA,
        )
E       AssertionError: None != 

tests/test_flags.py:51: AssertionError

test_flags.py::FlagsTestCase::test_flags2

test_flags.py::FlagsTestCase::test_flags2
self = 

    def test_flags2(self):
        flags = dns.flags.QR | dns.flags.AA | dns.flags.RD | dns.flags.RA
>       self.assertEqual(dns.flags.to_text(flags), "QR AA RD RA")
E       AssertionError: None != 'QR AA RD RA'

tests/test_flags.py:58: AssertionError

test_flags.py::FlagsTestCase::test_rcode1

test_flags.py::FlagsTestCase::test_rcode1
self = 

    def test_rcode1(self):
>       self.assertEqual(dns.rcode.from_text("FORMERR"), dns.rcode.FORMERR)
E       AssertionError: None != 

tests/test_flags.py:27: AssertionError

test_flags.py::FlagsTestCase::test_rcode2

test_flags.py::FlagsTestCase::test_rcode2
self = 

    def test_rcode2(self):
>       self.assertEqual(dns.rcode.to_text(dns.rcode.FORMERR), "FORMERR")
E       AssertionError: None != 'FORMERR'

tests/test_flags.py:30: AssertionError

test_flags.py::FlagsTestCase::test_rcode3

test_flags.py::FlagsTestCase::test_rcode3
self = 

    def test_rcode3(self):
>       self.assertEqual(dns.rcode.to_flags(dns.rcode.FORMERR), (1, 0))
E       AssertionError: None != (1, 0)

tests/test_flags.py:33: AssertionError

test_flags.py::FlagsTestCase::test_rcode4

test_flags.py::FlagsTestCase::test_rcode4
self = 

    def test_rcode4(self):
>       self.assertEqual(dns.rcode.to_flags(dns.rcode.BADVERS), (0, 0x01000000))
E       AssertionError: None != (0, 16777216)

tests/test_flags.py:36: AssertionError

test_flags.py::FlagsTestCase::test_rcode6

test_flags.py::FlagsTestCase::test_rcode6
self = 

    def test_rcode6(self):
>       self.assertEqual(dns.rcode.from_flags(0, 0x01000000), dns.rcode.BADVERS)
E       AssertionError: None != 

tests/test_flags.py:39: AssertionError

test_flags.py::FlagsTestCase::test_rcode7

test_flags.py::FlagsTestCase::test_rcode7
self = 

    def test_rcode7(self):
>       self.assertEqual(dns.rcode.from_flags(5, 0), dns.rcode.REFUSED)
E       AssertionError: None != 

tests/test_flags.py:42: AssertionError

test_flags.py::FlagsTestCase::test_rcode8

test_flags.py::FlagsTestCase::test_rcode8
self = 

    def test_rcode8(self):
        def bad():
            dns.rcode.to_flags(4096)

>       self.assertRaises(ValueError, bad)
E       AssertionError: ValueError not raised by bad

tests/test_flags.py:48: AssertionError

test_flags.py::FlagsTestCase::test_rcode_badsig

test_flags.py::FlagsTestCase::test_rcode_badsig
self = 

    def test_rcode_badsig(self):
        rcode = dns.rcode.BADSIG
        self.assertEqual(rcode.value, 16)
        # Yes, we mean BADVERS on the next line.  BADSIG and BADVERS have
        # the same code.
        self.assertEqual(rcode.name, "BADVERS")
>       self.assertEqual(dns.rcode.to_text(rcode), "BADVERS")
E       AssertionError: None != 'BADVERS'

tests/test_flags.py:72: AssertionError

test_flags.py::FlagsTestCase::test_rcode_badvers

test_flags.py::FlagsTestCase::test_rcode_badvers
self = 

    def test_rcode_badvers(self):
        rcode = dns.rcode.BADVERS
        self.assertEqual(rcode.value, 16)
        self.assertEqual(rcode.name, "BADVERS")
>       self.assertEqual(dns.rcode.to_text(rcode), "BADVERS")
E       AssertionError: None != 'BADVERS'

tests/test_flags.py:64: AssertionError

test_flags.py::FlagsTestCase::test_unknown_rcode

test_flags.py::FlagsTestCase::test_unknown_rcode
self = 

    def test_unknown_rcode(self):
>       with self.assertRaises(dns.rcode.UnknownRcode):
E       AssertionError: UnknownRcode not raised

tests/test_flags.py:77: AssertionError

test_grange.py::GRangeTestCase::testFailFromText1

test_grange.py::GRangeTestCase::testFailFromText1
self = 

    def testFailFromText1(self):
        with self.assertRaises(dns.exception.SyntaxError):
            start = 2
            stop = 1
            step = 1
            dns.grange.from_text("%d-%d/%d" % (start, stop, step))
>           self.assertTrue(False)
E           AssertionError: False is not true

tests/test_grange.py:72: AssertionError

test_grange.py::GRangeTestCase::testFailFromText2

test_grange.py::GRangeTestCase::testFailFromText2
self = 

    def testFailFromText2(self):
>       with self.assertRaises(dns.exception.SyntaxError):
E       AssertionError: SyntaxError not raised

tests/test_grange.py:75: AssertionError

test_grange.py::GRangeTestCase::testFailFromText3

test_grange.py::GRangeTestCase::testFailFromText3
self = 

    def testFailFromText3(self):
>       with self.assertRaises(dns.exception.SyntaxError):
E       AssertionError: SyntaxError not raised

tests/test_grange.py:82: AssertionError

test_grange.py::GRangeTestCase::testFailFromText4

test_grange.py::GRangeTestCase::testFailFromText4
self = 

    def testFailFromText4(self):
>       with self.assertRaises(dns.exception.SyntaxError):
E       AssertionError: SyntaxError not raised

tests/test_grange.py:89: AssertionError

test_grange.py::GRangeTestCase::testFromText1

test_grange.py::GRangeTestCase::testFromText1
self = 

    def testFromText1(self):
>       start, stop, step = dns.grange.from_text("1-1")
E       TypeError: cannot unpack non-iterable NoneType object

tests/test_grange.py:31: TypeError

test_grange.py::GRangeTestCase::testFromText2

test_grange.py::GRangeTestCase::testFromText2
self = 

    def testFromText2(self):
>       start, stop, step = dns.grange.from_text("1-4")
E       TypeError: cannot unpack non-iterable NoneType object

tests/test_grange.py:37: TypeError

test_grange.py::GRangeTestCase::testFromText3

test_grange.py::GRangeTestCase::testFromText3
self = 

    def testFromText3(self):
>       start, stop, step = dns.grange.from_text("4-255")
E       TypeError: cannot unpack non-iterable NoneType object

tests/test_grange.py:43: TypeError

test_grange.py::GRangeTestCase::testFromText4

test_grange.py::GRangeTestCase::testFromText4
self = 

    def testFromText4(self):
>       start, stop, step = dns.grange.from_text("1-1/1")
E       TypeError: cannot unpack non-iterable NoneType object

tests/test_grange.py:49: TypeError

test_grange.py::GRangeTestCase::testFromText5

test_grange.py::GRangeTestCase::testFromText5
self = 

    def testFromText5(self):
>       start, stop, step = dns.grange.from_text("1-4/2")
E       TypeError: cannot unpack non-iterable NoneType object

tests/test_grange.py:55: TypeError

test_grange.py::GRangeTestCase::testFromText6

test_grange.py::GRangeTestCase::testFromText6
self = 

    def testFromText6(self):
>       start, stop, step = dns.grange.from_text("4-255/77")
E       TypeError: cannot unpack non-iterable NoneType object

tests/test_grange.py:61: TypeError

test_ntoaaton.py::NtoAAtoNTestCase::test_aton1

test_ntoaaton.py::NtoAAtoNTestCase::test_aton1
self = 

    def test_aton1(self):
        a = aton6("::")
>       self.assertEqual(a, b"\x00" * 16)
E       AssertionError: None != b'\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00'

tests/test_ntoaaton.py:70: AssertionError

test_ntoaaton.py::NtoAAtoNTestCase::test_aton2

test_ntoaaton.py::NtoAAtoNTestCase::test_aton2
self = 

    def test_aton2(self):
        a = aton6("::1")
>       self.assertEqual(a, b"\x00" * 15 + b"\x01")
E       AssertionError: None != b'\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x01'

tests/test_ntoaaton.py:74: AssertionError

test_ntoaaton.py::NtoAAtoNTestCase::test_aton3

test_ntoaaton.py::NtoAAtoNTestCase::test_aton3
self = 

    def test_aton3(self):
        a = aton6("::10.0.0.1")
>       self.assertEqual(a, b"\x00" * 12 + b"\x0a\x00\x00\x01")
E       AssertionError: None != b'\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\n\x00\x00\x01'

tests/test_ntoaaton.py:78: AssertionError

test_ntoaaton.py::NtoAAtoNTestCase::test_aton4

test_ntoaaton.py::NtoAAtoNTestCase::test_aton4
self = 

    def test_aton4(self):
        a = aton6("abcd::dcba")
>       self.assertEqual(a, b"\xab\xcd" + b"\x00" * 12 + b"\xdc\xba")
E       AssertionError: None != b'\xab\xcd\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xdc\xba'

tests/test_ntoaaton.py:82: AssertionError

test_ntoaaton.py::NtoAAtoNTestCase::test_aton5

test_ntoaaton.py::NtoAAtoNTestCase::test_aton5
self = 

    def test_aton5(self):
        a = aton6("1:2:3:4:5:6:7:8")
>       self.assertEqual(a, binascii.unhexlify(b"00010002000300040005000600070008"))
E       AssertionError: None != b'\x00\x01\x00\x02\x00\x03\x00\x04\x00\x05\x00\x06\x00\x07\x00\x08'

tests/test_ntoaaton.py:86: AssertionError

test_ntoaaton.py::NtoAAtoNTestCase::test_aton6

test_ntoaaton.py::NtoAAtoNTestCase::test_aton6
self = 

    def test_aton6(self):
        a = aton6("::")
>       self.assertEqual(a, b"\x00" * 16)
E       AssertionError: None != b'\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00'

tests/test_ntoaaton.py:114: AssertionError

test_ntoaaton.py::NtoAAtoNTestCase::test_aton7

test_ntoaaton.py::NtoAAtoNTestCase::test_aton7
self = 

    def test_aton7(self):
        a = aton6("::1")
>       self.assertEqual(a, b"\x00" * 15 + b"\x01")
E       AssertionError: None != b'\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x01'

tests/test_ntoaaton.py:118: AssertionError

test_ntoaaton.py::NtoAAtoNTestCase::test_aton8

test_ntoaaton.py::NtoAAtoNTestCase::test_aton8
self = 

    def test_aton8(self):
        a = aton6("::10.0.0.1")
>       self.assertEqual(a, b"\x00" * 12 + b"\x0a\x00\x00\x01")
E       AssertionError: None != b'\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\n\x00\x00\x01'

tests/test_ntoaaton.py:122: AssertionError

test_ntoaaton.py::NtoAAtoNTestCase::test_aton9

test_ntoaaton.py::NtoAAtoNTestCase::test_aton9
self = 

    def test_aton9(self):
        a = aton6("abcd::dcba")
>       self.assertEqual(a, b"\xab\xcd" + b"\x00" * 12 + b"\xdc\xba")
E       AssertionError: None != b'\xab\xcd\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xdc\xba'

tests/test_ntoaaton.py:126: AssertionError

test_ntoaaton.py::NtoAAtoNTestCase::test_bad_aton1

test_ntoaaton.py::NtoAAtoNTestCase::test_bad_aton1
self = 

    def test_bad_aton1(self):
        def bad():
            aton6("abcd:dcba")

>       self.assertRaises(dns.exception.SyntaxError, bad)
E       AssertionError: SyntaxError not raised by bad

tests/test_ntoaaton.py:92: AssertionError

test_ntoaaton.py::NtoAAtoNTestCase::test_bad_aton2

test_ntoaaton.py::NtoAAtoNTestCase::test_bad_aton2
self = 

    def test_bad_aton2(self):
        def bad():
            aton6("abcd::dcba::1")

>       self.assertRaises(dns.exception.SyntaxError, bad)
E       AssertionError: SyntaxError not raised by bad

tests/test_ntoaaton.py:98: AssertionError

test_ntoaaton.py::NtoAAtoNTestCase::test_bad_aton3

test_ntoaaton.py::NtoAAtoNTestCase::test_bad_aton3
self = 

    def test_bad_aton3(self):
        def bad():
            aton6("1:2:3:4:5:6:7:8:9")

>       self.assertRaises(dns.exception.SyntaxError, bad)
E       AssertionError: SyntaxError not raised by bad

tests/test_ntoaaton.py:104: AssertionError

test_ntoaaton.py::NtoAAtoNTestCase::test_bad_aton4

test_ntoaaton.py::NtoAAtoNTestCase::test_bad_aton4
self = 

    def test_bad_aton4(self):
        def bad():
            aton4("001.002.003.004")

>       self.assertRaises(dns.exception.SyntaxError, bad)
E       AssertionError: SyntaxError not raised by bad

tests/test_ntoaaton.py:110: AssertionError

test_ntoaaton.py::NtoAAtoNTestCase::test_bad_ntoa1

test_ntoaaton.py::NtoAAtoNTestCase::test_bad_ntoa1
self = 

    def test_bad_ntoa1(self):
        def bad():
            ntoa6(b"")

>       self.assertRaises(ValueError, bad)
E       AssertionError: ValueError not raised by bad

tests/test_ntoaaton.py:208: AssertionError

test_ntoaaton.py::NtoAAtoNTestCase::test_bad_ntoa2

test_ntoaaton.py::NtoAAtoNTestCase::test_bad_ntoa2
self = 

    def test_bad_ntoa2(self):
        def bad():
            ntoa6(b"\x00" * 17)

>       self.assertRaises(ValueError, bad)
E       AssertionError: ValueError not raised by bad

tests/test_ntoaaton.py:214: AssertionError

test_ntoaaton.py::NtoAAtoNTestCase::test_bad_ntoa3

test_ntoaaton.py::NtoAAtoNTestCase::test_bad_ntoa3
self = 

    def test_bad_ntoa3(self):
        def bad():
            ntoa4(b"\x00" * 5)

        # Ideally we'd have been consistent and raised ValueError as
        # we do for IPv6, but oh well!
>       self.assertRaises(dns.exception.SyntaxError, bad)
E       AssertionError: SyntaxError not raised by bad

tests/test_ntoaaton.py:222: AssertionError

test_ntoaaton.py::NtoAAtoNTestCase::test_bad_v4_aton

test_ntoaaton.py::NtoAAtoNTestCase::test_bad_v4_aton
self = 

    def test_bad_v4_aton(self):
        def make_bad(a):
            def bad():
                return aton4(a)

            return bad

        for addr in v4_bad_addrs:
>           self.assertRaises(dns.exception.SyntaxError, make_bad(addr))
E           AssertionError: SyntaxError not raised by bad

tests/test_ntoaaton.py:244: AssertionError

test_ntoaaton.py::NtoAAtoNTestCase::test_bad_v6_aton

test_ntoaaton.py::NtoAAtoNTestCase::test_bad_v6_aton
self = 

    def test_bad_v6_aton(self):
        addrs = ["+::0", "0::0::", "::0::", "1:2:3:4:5:6:7:8:9", ":::::::"]
        embedded = ["::" + x for x in v4_bad_addrs]
        addrs.extend(embedded)

        def make_bad(a):
            def bad():
                x = aton6(a)

            return bad

        for addr in addrs:
>           self.assertRaises(dns.exception.SyntaxError, make_bad(addr))
E           AssertionError: SyntaxError not raised by bad

tests/test_ntoaaton.py:258: AssertionError

test_ntoaaton.py::NtoAAtoNTestCase::test_bogus_family

test_ntoaaton.py::NtoAAtoNTestCase::test_bogus_family
self = 

    def test_bogus_family(self):
>       self.assertRaises(
            NotImplementedError, lambda: dns.inet.inet_pton(12345, "bogus")
        )
E       AssertionError: NotImplementedError not raised by 

tests/test_ntoaaton.py:368: AssertionError

test_ntoaaton.py::NtoAAtoNTestCase::test_do_not_ignore_scope

test_ntoaaton.py::NtoAAtoNTestCase::test_do_not_ignore_scope
self = 

    def test_do_not_ignore_scope(self):
        def bad():
            t1 = "fe80::1%lo0"
            aton6(t1)

>       self.assertRaises(dns.exception.SyntaxError, bad)
E       AssertionError: SyntaxError not raised by bad

tests/test_ntoaaton.py:304: AssertionError

test_ntoaaton.py::NtoAAtoNTestCase::test_good_v4_aton

test_ntoaaton.py::NtoAAtoNTestCase::test_good_v4_aton
self = 

    def test_good_v4_aton(self):
        pairs = [
            ("1.2.3.4", b"\x01\x02\x03\x04"),
            ("255.255.255.255", b"\xff\xff\xff\xff"),
            ("0.0.0.0", b"\x00\x00\x00\x00"),
        ]
        for t, b in pairs:
            b1 = aton4(t)
            t1 = ntoa4(b1)
>           self.assertEqual(b1, b)
E           AssertionError: None != b'\x01\x02\x03\x04'

tests/test_ntoaaton.py:233: AssertionError

test_ntoaaton.py::NtoAAtoNTestCase::test_inet_canonicalize

test_ntoaaton.py::NtoAAtoNTestCase::test_inet_canonicalize
self = 

    def test_inet_canonicalize(self):
        for address, expected in itertools.chain(
            v4_canonicalize_addrs, v6_canonicalize_addrs
        ):
>           self.assertEqual(dns.inet.canonicalize(address), expected)
E           AssertionError: None != '127.0.0.1'

tests/test_ntoaaton.py:395: AssertionError

test_ntoaaton.py::NtoAAtoNTestCase::test_ipv4_canonicalize

test_ntoaaton.py::NtoAAtoNTestCase::test_ipv4_canonicalize
self = 

    def test_ipv4_canonicalize(self):
        for address, expected in v4_canonicalize_addrs:
>           self.assertEqual(dns.ipv4.canonicalize(address), expected)
E           AssertionError: None != '127.0.0.1'

tests/test_ntoaaton.py:377: AssertionError

test_ntoaaton.py::NtoAAtoNTestCase::test_ipv6_canonicalize

test_ntoaaton.py::NtoAAtoNTestCase::test_ipv6_canonicalize
self = 

    def test_ipv6_canonicalize(self):
        for address, expected in v6_canonicalize_addrs:
>           self.assertEqual(dns.ipv6.canonicalize(address), expected)
E           AssertionError: None != '2001:503:83eb::30'

tests/test_ntoaaton.py:385: AssertionError

test_ntoaaton.py::NtoAAtoNTestCase::test_is_mapped

test_ntoaaton.py::NtoAAtoNTestCase::test_is_mapped
self = 

    def test_is_mapped(self):
        t1 = "2001:db8:0:1:1:1:1:1"
        t2 = "::ffff:127.0.0.1"
        t3 = "1::ffff:127.0.0.1"
        self.assertFalse(dns.ipv6.is_mapped(aton6(t1)))
>       self.assertTrue(dns.ipv6.is_mapped(aton6(t2)))
E       AssertionError: None is not true

tests/test_ntoaaton.py:271: AssertionError

test_ntoaaton.py::NtoAAtoNTestCase::test_is_multicast

test_ntoaaton.py::NtoAAtoNTestCase::test_is_multicast
self = 

    def test_is_multicast(self):
        t1 = "223.0.0.1"
        t2 = "240.0.0.1"
        t3 = "224.0.0.1"
        t4 = "239.0.0.1"
        t5 = "fe00::1"
        t6 = "ff00::1"
        self.assertFalse(dns.inet.is_multicast(t1))
        self.assertFalse(dns.inet.is_multicast(t2))
>       self.assertTrue(dns.inet.is_multicast(t3))
E       AssertionError: None is not true

tests/test_ntoaaton.py:283: AssertionError

test_ntoaaton.py::NtoAAtoNTestCase::test_is_multicast_bad_input

test_ntoaaton.py::NtoAAtoNTestCase::test_is_multicast_bad_input
self = 

    def test_is_multicast_bad_input(self):
        def bad():
            dns.inet.is_multicast("hello world")

>       self.assertRaises(ValueError, bad)
E       AssertionError: ValueError not raised by bad

tests/test_ntoaaton.py:292: AssertionError

test_ntoaaton.py::NtoAAtoNTestCase::test_isaddress

test_ntoaaton.py::NtoAAtoNTestCase::test_isaddress
self = 

    def test_isaddress(self):
        for t, e in [
            ("1.2.3.4", True),
            ("2001:db8:0:1:1:1:1:1", True),
            ("hello world", False),
            ("http://www.dnspython.org", False),
            ("1.2.3.4a", False),
            ("2001:db8:0:1:1:1:1:q1", False),
        ]:
>           self.assertEqual(dns.inet.is_address(t), e)
E           AssertionError: None != True

tests/test_ntoaaton.py:329: AssertionError

test_ntoaaton.py::NtoAAtoNTestCase::test_low_level_address_tuple

test_ntoaaton.py::NtoAAtoNTestCase::test_low_level_address_tuple
self = 

    def test_low_level_address_tuple(self):
        t = dns.inet.low_level_address_tuple(("1.2.3.4", 53))
>       self.assertEqual(t, ("1.2.3.4", 53))
E       AssertionError: None != ('1.2.3.4', 53)

tests/test_ntoaaton.py:333: AssertionError

test_ntoaaton.py::NtoAAtoNTestCase::test_multiple_scopes_bad

test_ntoaaton.py::NtoAAtoNTestCase::test_multiple_scopes_bad
self = 

    def test_multiple_scopes_bad(self):
        def bad():
            t1 = "fe80::1%lo0%lo1"
            aton6(t1, True)

>       self.assertRaises(dns.exception.SyntaxError, bad)
E       AssertionError: SyntaxError not raised by bad

tests/test_ntoaaton.py:311: AssertionError

test_ntoaaton.py::NtoAAtoNTestCase::test_ntoa1

test_ntoaaton.py::NtoAAtoNTestCase::test_ntoa1
self = 

    def test_ntoa1(self):
        b = binascii.unhexlify(b"00010002000300040005000600070008")
        t = ntoa6(b)
>       self.assertEqual(t, "1:2:3:4:5:6:7:8")
E       AssertionError: None != '1:2:3:4:5:6:7:8'

tests/test_ntoaaton.py:131: AssertionError

test_ntoaaton.py::NtoAAtoNTestCase::test_ntoa10

test_ntoaaton.py::NtoAAtoNTestCase::test_ntoa10
self = 

    def test_ntoa10(self):
        b = binascii.unhexlify(b"0000000000000000000000010a000001")
        t = ntoa6(b)
>       self.assertEqual(t, "::1:a00:1")
E       AssertionError: None != '::1:a00:1'

tests/test_ntoaaton.py:176: AssertionError

test_ntoaaton.py::NtoAAtoNTestCase::test_ntoa11

test_ntoaaton.py::NtoAAtoNTestCase::test_ntoa11
self = 

    def test_ntoa11(self):
        b = binascii.unhexlify(b"00000000000000000000ffff0a000001")
        t = ntoa6(b)
>       self.assertEqual(t, "::ffff:10.0.0.1")
E       AssertionError: None != '::ffff:10.0.0.1'

tests/test_ntoaaton.py:181: AssertionError

test_ntoaaton.py::NtoAAtoNTestCase::test_ntoa12

test_ntoaaton.py::NtoAAtoNTestCase::test_ntoa12
self = 

    def test_ntoa12(self):
        b = binascii.unhexlify(b"000000000000000000000000ffffffff")
        t = ntoa6(b)
>       self.assertEqual(t, "::255.255.255.255")
E       AssertionError: None != '::255.255.255.255'

tests/test_ntoaaton.py:186: AssertionError

test_ntoaaton.py::NtoAAtoNTestCase::test_ntoa13

test_ntoaaton.py::NtoAAtoNTestCase::test_ntoa13
self = 

    def test_ntoa13(self):
        b = binascii.unhexlify(b"00000000000000000000ffffffffffff")
        t = ntoa6(b)
>       self.assertEqual(t, "::ffff:255.255.255.255")
E       AssertionError: None != '::ffff:255.255.255.255'

tests/test_ntoaaton.py:191: AssertionError

test_ntoaaton.py::NtoAAtoNTestCase::test_ntoa14

test_ntoaaton.py::NtoAAtoNTestCase::test_ntoa14
self = 

    def test_ntoa14(self):
        b = binascii.unhexlify(b"0000000000000000000000000001ffff")
        t = ntoa6(b)
>       self.assertEqual(t, "::0.1.255.255")
E       AssertionError: None != '::0.1.255.255'

tests/test_ntoaaton.py:196: AssertionError

test_ntoaaton.py::NtoAAtoNTestCase::test_ntoa15

test_ntoaaton.py::NtoAAtoNTestCase::test_ntoa15
self = 

    def test_ntoa15(self):
        # This exercises the current_len > best_len branch in the <= case.
        b = binascii.unhexlify(b"0000ffff00000000ffff00000000ffff")
        t = ntoa6(b)
>       self.assertEqual(t, "0:ffff::ffff:0:0:ffff")
E       AssertionError: None != '0:ffff::ffff:0:0:ffff'

tests/test_ntoaaton.py:202: AssertionError

test_ntoaaton.py::NtoAAtoNTestCase::test_ntoa2

test_ntoaaton.py::NtoAAtoNTestCase::test_ntoa2
self = 

    def test_ntoa2(self):
        b = b"\x00" * 16
        t = ntoa6(b)
>       self.assertEqual(t, "::")
E       AssertionError: None != '::'

tests/test_ntoaaton.py:136: AssertionError

test_ntoaaton.py::NtoAAtoNTestCase::test_ntoa3

test_ntoaaton.py::NtoAAtoNTestCase::test_ntoa3
self = 

    def test_ntoa3(self):
        b = b"\x00" * 15 + b"\x01"
        t = ntoa6(b)
>       self.assertEqual(t, "::1")
E       AssertionError: None != '::1'

tests/test_ntoaaton.py:141: AssertionError

test_ntoaaton.py::NtoAAtoNTestCase::test_ntoa4

test_ntoaaton.py::NtoAAtoNTestCase::test_ntoa4
self = 

    def test_ntoa4(self):
        b = b"\x80" + b"\x00" * 15
        t = ntoa6(b)
>       self.assertEqual(t, "8000::")
E       AssertionError: None != '8000::'

tests/test_ntoaaton.py:146: AssertionError

test_ntoaaton.py::NtoAAtoNTestCase::test_ntoa5

test_ntoaaton.py::NtoAAtoNTestCase::test_ntoa5
self = 

    def test_ntoa5(self):
        b = b"\x01\xcd" + b"\x00" * 12 + b"\x03\xef"
        t = ntoa6(b)
>       self.assertEqual(t, "1cd::3ef")
E       AssertionError: None != '1cd::3ef'

tests/test_ntoaaton.py:151: AssertionError

test_ntoaaton.py::NtoAAtoNTestCase::test_ntoa6

test_ntoaaton.py::NtoAAtoNTestCase::test_ntoa6
self = 

    def test_ntoa6(self):
        b = binascii.unhexlify(b"ffff00000000ffff000000000000ffff")
        t = ntoa6(b)
>       self.assertEqual(t, "ffff:0:0:ffff::ffff")
E       AssertionError: None != 'ffff:0:0:ffff::ffff'

tests/test_ntoaaton.py:156: AssertionError

test_ntoaaton.py::NtoAAtoNTestCase::test_ntoa7

test_ntoaaton.py::NtoAAtoNTestCase::test_ntoa7
self = 

    def test_ntoa7(self):
        b = binascii.unhexlify(b"00000000ffff000000000000ffffffff")
        t = ntoa6(b)
>       self.assertEqual(t, "0:0:ffff::ffff:ffff")
E       AssertionError: None != '0:0:ffff::ffff:ffff'

tests/test_ntoaaton.py:161: AssertionError

test_ntoaaton.py::NtoAAtoNTestCase::test_ntoa8

test_ntoaaton.py::NtoAAtoNTestCase::test_ntoa8
self = 

    def test_ntoa8(self):
        b = binascii.unhexlify(b"ffff0000ffff00000000ffff00000000")
        t = ntoa6(b)
>       self.assertEqual(t, "ffff:0:ffff::ffff:0:0")
E       AssertionError: None != 'ffff:0:ffff::ffff:0:0'

tests/test_ntoaaton.py:166: AssertionError

test_ntoaaton.py::NtoAAtoNTestCase::test_ntoa9

test_ntoaaton.py::NtoAAtoNTestCase::test_ntoa9
self = 

    def test_ntoa9(self):
        b = binascii.unhexlify(b"0000000000000000000000000a000001")
        t = ntoa6(b)
>       self.assertEqual(t, "::10.0.0.1")
E       AssertionError: None != '::10.0.0.1'

tests/test_ntoaaton.py:171: AssertionError

test_ntoaaton.py::NtoAAtoNTestCase::test_ptontop

test_ntoaaton.py::NtoAAtoNTestCase::test_ptontop
self = 

    def test_ptontop(self):
        for af, a in [
            (socket.AF_INET, "1.2.3.4"),
            (socket.AF_INET6, "2001:db8:0:1:1:1:1:1"),
        ]:
>           self.assertEqual(dns.inet.inet_ntop(af, dns.inet.inet_pton(af, a)), a)
E           AssertionError: None != '1.2.3.4'

tests/test_ntoaaton.py:318: AssertionError

test_ntoaaton.py::NtoAAtoNTestCase::test_rfc5952_section_4_2_2

test_ntoaaton.py::NtoAAtoNTestCase::test_rfc5952_section_4_2_2
self = 

    def test_rfc5952_section_4_2_2(self):
        addr = "2001:db8:0:1:1:1:1:1"
        b1 = aton6(addr)
        t1 = ntoa6(b1)
>       self.assertEqual(t1, addr)
E       AssertionError: None != '2001:db8:0:1:1:1:1:1'

tests/test_ntoaaton.py:264: AssertionError

test_rdtypeandclass.py::RdTypeAndClassTestCase::test_class_bytext1

test_rdtypeandclass.py::RdTypeAndClassTestCase::test_class_bytext1
self = 

    def test_class_bytext1(self):
>       self.assertEqual(dns.rdataclass.from_text("IN"), dns.rdataclass.IN)
E       AssertionError: None != 

tests/test_rdtypeandclass.py:34: AssertionError

test_rdtypeandclass.py::RdTypeAndClassTestCase::test_class_bytext2

test_rdtypeandclass.py::RdTypeAndClassTestCase::test_class_bytext2
self = 

    def test_class_bytext2(self):
>       self.assertEqual(dns.rdataclass.from_text("CLASS1"), dns.rdataclass.IN)
E       AssertionError: None != 

tests/test_rdtypeandclass.py:37: AssertionError

test_rdtypeandclass.py::RdTypeAndClassTestCase::test_class_bytext_bounds1

test_rdtypeandclass.py::RdTypeAndClassTestCase::test_class_bytext_bounds1
self = 

    def test_class_bytext_bounds1(self):
>       self.assertEqual(dns.rdataclass.from_text("CLASS0"), 0)
E       AssertionError: None != 0

tests/test_rdtypeandclass.py:40: AssertionError

test_rdtypeandclass.py::RdTypeAndClassTestCase::test_class_bytext_bounds2

test_rdtypeandclass.py::RdTypeAndClassTestCase::test_class_bytext_bounds2
self = 

    def test_class_bytext_bounds2(self):
        def bad():
            dns.rdataclass.from_text("CLASS65536")

>       self.assertRaises(ValueError, bad)
E       AssertionError: ValueError not raised by bad

tests/test_rdtypeandclass.py:47: AssertionError

test_rdtypeandclass.py::RdTypeAndClassTestCase::test_class_bytext_unknown

test_rdtypeandclass.py::RdTypeAndClassTestCase::test_class_bytext_unknown
self = 

    def test_class_bytext_unknown(self):
        def bad():
            dns.rdataclass.from_text("XXX")

>       self.assertRaises(dns.rdataclass.UnknownRdataclass, bad)
E       AssertionError: UnknownRdataclass not raised by bad

tests/test_rdtypeandclass.py:53: AssertionError

test_rdtypeandclass.py::RdTypeAndClassTestCase::test_class_meta1

test_rdtypeandclass.py::RdTypeAndClassTestCase::test_class_meta1
self = 

    def test_class_meta1(self):
>       self.assertTrue(dns.rdataclass.is_metaclass(dns.rdataclass.ANY))
E       AssertionError: None is not true

tests/test_rdtypeandclass.py:28: AssertionError

test_rdtypeandclass.py::RdTypeAndClassTestCase::test_class_totext1

test_rdtypeandclass.py::RdTypeAndClassTestCase::test_class_totext1
self = 

    def test_class_totext1(self):
>       self.assertEqual(dns.rdataclass.to_text(dns.rdataclass.IN), "IN")
E       AssertionError: None != 'IN'

tests/test_rdtypeandclass.py:56: AssertionError

test_rdtypeandclass.py::RdTypeAndClassTestCase::test_class_totext2

test_rdtypeandclass.py::RdTypeAndClassTestCase::test_class_totext2
self = 

    def test_class_totext2(self):
>       self.assertEqual(dns.rdataclass.to_text(999), "CLASS999")
E       AssertionError: None != 'CLASS999'

tests/test_rdtypeandclass.py:59: AssertionError

test_rdtypeandclass.py::RdTypeAndClassTestCase::test_class_totext_bounds1

test_rdtypeandclass.py::RdTypeAndClassTestCase::test_class_totext_bounds1
self = 

    def test_class_totext_bounds1(self):
        def bad():
            dns.rdataclass.to_text(-1)

>       self.assertRaises(ValueError, bad)
E       AssertionError: ValueError not raised by bad

tests/test_rdtypeandclass.py:65: AssertionError

test_rdtypeandclass.py::RdTypeAndClassTestCase::test_class_totext_bounds2

test_rdtypeandclass.py::RdTypeAndClassTestCase::test_class_totext_bounds2
self = 

    def test_class_totext_bounds2(self):
        def bad():
            dns.rdataclass.to_text(65536)

>       self.assertRaises(ValueError, bad)
E       AssertionError: ValueError not raised by bad

tests/test_rdtypeandclass.py:71: AssertionError

test_rdtypeandclass.py::RdTypeAndClassTestCase::test_type0_totext

test_rdtypeandclass.py::RdTypeAndClassTestCase::test_type0_totext
self = 

    def test_type0_totext(self):
>       self.assertEqual(dns.rdatatype.to_text(0), "TYPE0")
E       AssertionError: None != 'TYPE0'

tests/test_rdtypeandclass.py:131: AssertionError

test_rdtypeandclass.py::RdTypeAndClassTestCase::test_type_bytext1

test_rdtypeandclass.py::RdTypeAndClassTestCase::test_type_bytext1
self = 

    def test_type_bytext1(self):
>       self.assertEqual(dns.rdatatype.from_text("A"), dns.rdatatype.A)
E       AssertionError: None != 

tests/test_rdtypeandclass.py:91: AssertionError

test_rdtypeandclass.py::RdTypeAndClassTestCase::test_type_bytext2

test_rdtypeandclass.py::RdTypeAndClassTestCase::test_type_bytext2
self = 

    def test_type_bytext2(self):
>       self.assertEqual(dns.rdatatype.from_text("TYPE1"), dns.rdatatype.A)
E       AssertionError: None != 

tests/test_rdtypeandclass.py:94: AssertionError

test_rdtypeandclass.py::RdTypeAndClassTestCase::test_type_bytext_bounds1

test_rdtypeandclass.py::RdTypeAndClassTestCase::test_type_bytext_bounds1
self = 

    def test_type_bytext_bounds1(self):
>       self.assertEqual(dns.rdatatype.from_text("TYPE0"), 0)
E       AssertionError: None != 0

tests/test_rdtypeandclass.py:97: AssertionError

test_rdtypeandclass.py::RdTypeAndClassTestCase::test_type_bytext_bounds2

test_rdtypeandclass.py::RdTypeAndClassTestCase::test_type_bytext_bounds2
self = 

    def test_type_bytext_bounds2(self):
        def bad():
            dns.rdatatype.from_text("TYPE65536")

>       self.assertRaises(ValueError, bad)
E       AssertionError: ValueError not raised by bad

tests/test_rdtypeandclass.py:104: AssertionError

test_rdtypeandclass.py::RdTypeAndClassTestCase::test_type_bytext_unknown

test_rdtypeandclass.py::RdTypeAndClassTestCase::test_type_bytext_unknown
self = 

    def test_type_bytext_unknown(self):
        def bad():
            dns.rdatatype.from_text("XXX")

>       self.assertRaises(dns.rdatatype.UnknownRdatatype, bad)
E       AssertionError: UnknownRdatatype not raised by bad

tests/test_rdtypeandclass.py:110: AssertionError

test_rdtypeandclass.py::RdTypeAndClassTestCase::test_type_meta1

test_rdtypeandclass.py::RdTypeAndClassTestCase::test_type_meta1
self = 

    def test_type_meta1(self):
>       self.assertTrue(dns.rdatatype.is_metatype(dns.rdatatype.ANY))
E       AssertionError: None is not true

tests/test_rdtypeandclass.py:76: AssertionError

test_rdtypeandclass.py::RdTypeAndClassTestCase::test_type_meta2

test_rdtypeandclass.py::RdTypeAndClassTestCase::test_type_meta2
self = 

    def test_type_meta2(self):
>       self.assertTrue(dns.rdatatype.is_metatype(dns.rdatatype.OPT))
E       AssertionError: None is not true

tests/test_rdtypeandclass.py:79: AssertionError

test_rdtypeandclass.py::RdTypeAndClassTestCase::test_type_singleton1

test_rdtypeandclass.py::RdTypeAndClassTestCase::test_type_singleton1
self = 

    def test_type_singleton1(self):
>       self.assertTrue(dns.rdatatype.is_singleton(dns.rdatatype.SOA))
E       AssertionError: None is not true

tests/test_rdtypeandclass.py:85: AssertionError

test_rdtypeandclass.py::RdTypeAndClassTestCase::test_type_totext1

test_rdtypeandclass.py::RdTypeAndClassTestCase::test_type_totext1
self = 

    def test_type_totext1(self):
>       self.assertEqual(dns.rdatatype.to_text(dns.rdatatype.A), "A")
E       AssertionError: None != 'A'

tests/test_rdtypeandclass.py:113: AssertionError

test_rdtypeandclass.py::RdTypeAndClassTestCase::test_type_totext2

test_rdtypeandclass.py::RdTypeAndClassTestCase::test_type_totext2
self = 

    def test_type_totext2(self):
>       self.assertEqual(dns.rdatatype.to_text(999), "TYPE999")
E       AssertionError: None != 'TYPE999'

tests/test_rdtypeandclass.py:116: AssertionError

test_rdtypeandclass.py::RdTypeAndClassTestCase::test_type_totext_bounds1

test_rdtypeandclass.py::RdTypeAndClassTestCase::test_type_totext_bounds1
self = 

    def test_type_totext_bounds1(self):
        def bad():
            dns.rdatatype.to_text(-1)

>       self.assertRaises(ValueError, bad)
E       AssertionError: ValueError not raised by bad

tests/test_rdtypeandclass.py:122: AssertionError

test_rdtypeandclass.py::RdTypeAndClassTestCase::test_type_totext_bounds2

test_rdtypeandclass.py::RdTypeAndClassTestCase::test_type_totext_bounds2
self = 

    def test_type_totext_bounds2(self):
        def bad():
            dns.rdatatype.to_text(65536)

>       self.assertRaises(ValueError, bad)
E       AssertionError: ValueError not raised by bad

tests/test_rdtypeandclass.py:128: AssertionError

test_set.py::SetTestCase::testBadDisjoint

test_set.py::SetTestCase::testBadDisjoint
self = 

    def testBadDisjoint(self):
        s = S([1, 2, 3])
>       self.assertRaises(ValueError, lambda: s.isdisjoint(123))

tests/test_set.py:324: 
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 

>   self.assertRaises(ValueError, lambda: s.isdisjoint(123))
E   AttributeError: 'Set' object has no attribute 'isdisjoint'

tests/test_set.py:324: AttributeError

test_set.py::SetTestCase::testBadSubsetSuperset

test_set.py::SetTestCase::testBadSubsetSuperset
self = 

    def testBadSubsetSuperset(self):
        s = S([1, 2, 3])
>       self.assertRaises(ValueError, lambda: s.issubset(123))
E       AssertionError: ValueError not raised by 

tests/test_set.py:319: AssertionError

test_set.py::SetTestCase::testBadUpdates

test_set.py::SetTestCase::testBadUpdates
self = 

    def testBadUpdates(self):
        s = S([1, 2, 3])
>       self.assertRaises(ValueError, lambda: s.union_update(1))
E       AssertionError: ValueError not raised by 

tests/test_set.py:302: AssertionError

test_set.py::SetTestCase::testCopy

test_set.py::SetTestCase::testCopy
self = 

    def testCopy(self):
        s1 = S([1, 2, 3])
        s2 = s1.copy()
        s1.remove(1)
>       self.assertNotEqual(s1, s2)

tests/test_set.py:294: 
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 
dns/set.py:170: in __ne__
    return not self.__eq__(other)
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 

self = dns.set.Set([]), other = None

    def __eq__(self, other):
>       return self.items == other.items
E       AttributeError: 'NoneType' object has no attribute 'items'

dns/set.py:167: AttributeError

test_set.py::SetTestCase::testDelitem

test_set.py::SetTestCase::testDelitem
self = 

    def testDelitem(self):
        s1 = S([1, 2, 3])
>       del s1[0]

tests/test_set.py:269: 
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 
dns/set.py:189: in __delitem__
    del self.items[self[i]]
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 

self = dns.set.Set([]), i = 0

    def __getitem__(self, i):
        if isinstance(i, slice):
            return list(itertools.islice(self.items, i.start, i.stop, i.step))
        else:
>           return next(itertools.islice(self.items, i, i + 1))
E           StopIteration

dns/set.py:182: StopIteration

test_set.py::SetTestCase::testDelslice

test_set.py::SetTestCase::testDelslice
self = 

    def testDelslice(self):
        s1 = S([1, 2, 3])
        del s1[0:2]
>       self.assertEqual(list(s1), [3])
E       AssertionError: Lists differ: [] != [3]
E       
E       Second list contains 1 additional elements.
E       First extra element 0:
E       3
E       
E       - []
E       + [3]
E       ?  +

tests/test_set.py:275: AssertionError

test_set.py::SetTestCase::testDifference1

test_set.py::SetTestCase::testDifference1
self = 

    def testDifference1(self):
        s1 = S([1, 2, 3])
        s2 = S([5, 4])
        e = S([1, 2, 3])
>       self.assertEqual(s1 - s2, e)

tests/test_set.py:92: 
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 

self = dns.set.Set([]), other = None

    def __eq__(self, other):
>       return self.items == other.items
E       AttributeError: 'NoneType' object has no attribute 'items'

dns/set.py:167: AttributeError

test_set.py::SetTestCase::testDifference2

test_set.py::SetTestCase::testDifference2
self = 

    def testDifference2(self):
        s1 = S([1, 2, 3])
        s2 = S([])
        e = S([1, 2, 3])
>       self.assertEqual(s1 - s2, e)

tests/test_set.py:98: 
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 

self = dns.set.Set([]), other = None

    def __eq__(self, other):
>       return self.items == other.items
E       AttributeError: 'NoneType' object has no attribute 'items'

dns/set.py:167: AttributeError

test_set.py::SetTestCase::testDifference3

test_set.py::SetTestCase::testDifference3
self = 

    def testDifference3(self):
        s1 = S([1, 2, 3])
        s2 = S([3, 2])
        e = S([1])
>       self.assertEqual(s1 - s2, e)

tests/test_set.py:104: 
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 

self = dns.set.Set([]), other = None

    def __eq__(self, other):
>       return self.items == other.items
E       AttributeError: 'NoneType' object has no attribute 'items'

dns/set.py:167: AttributeError

test_set.py::SetTestCase::testDifference4

test_set.py::SetTestCase::testDifference4
self = 

    def testDifference4(self):
        s1 = S([1, 2, 3])
        s2 = S([3, 2, 1])
        e = S([])
>       self.assertEqual(s1 - s2, e)

tests/test_set.py:110: 
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 

self = dns.set.Set([]), other = None

    def __eq__(self, other):
>       return self.items == other.items
E       AttributeError: 'NoneType' object has no attribute 'items'

dns/set.py:167: AttributeError

test_set.py::SetTestCase::testDisjoint1

test_set.py::SetTestCase::testDisjoint1
self = 

    def testDisjoint1(self):
        s1 = S([1, 2, 3])
        s2 = S([4])
>       self.assertTrue(s1.isdisjoint(s2))
E       AttributeError: 'Set' object has no attribute 'isdisjoint'

tests/test_set.py:210: AttributeError

test_set.py::SetTestCase::testDisjoint2

test_set.py::SetTestCase::testDisjoint2
self = 

    def testDisjoint2(self):
        s1 = S([1, 2, 3])
        s2 = S([2, 4])
>       self.assertTrue(not s1.isdisjoint(s2))
E       AttributeError: 'Set' object has no attribute 'isdisjoint'

tests/test_set.py:215: AttributeError

test_set.py::SetTestCase::testDisjoint3

test_set.py::SetTestCase::testDisjoint3
self = 

    def testDisjoint3(self):
        s1 = S([1, 2, 3])
        s2 = S([])
>       self.assertTrue(s1.isdisjoint(s2))
E       AttributeError: 'Set' object has no attribute 'isdisjoint'

tests/test_set.py:220: AttributeError

test_set.py::SetTestCase::testGetitem

test_set.py::SetTestCase::testGetitem
self = 

    def testGetitem(self):
        s1 = S([1, 2, 3])
>       i0 = s1[0]

tests/test_set.py:252: 
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 

self = dns.set.Set([]), i = 0

    def __getitem__(self, i):
        if isinstance(i, slice):
            return list(itertools.islice(self.items, i.start, i.stop, i.step))
        else:
>           return next(itertools.islice(self.items, i, i + 1))
E           StopIteration

dns/set.py:182: StopIteration

test_set.py::SetTestCase::testGetslice

test_set.py::SetTestCase::testGetslice
self = 

    def testGetslice(self):
        s1 = S([1, 2, 3])
        slice = s1[0:2]
>       self.assertEqual(len(slice), 2)
E       AssertionError: 0 != 2

tests/test_set.py:261: AssertionError

test_set.py::SetTestCase::testIntersection1

test_set.py::SetTestCase::testIntersection1
self = 

    def testIntersection1(self):
        s1 = S([1, 2, 3])
        s2 = S([1, 2, 3])
        e = S([1, 2, 3])
>       self.assertEqual(s1 & s2, e)

tests/test_set.py:68: 
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 

self = dns.set.Set([]), other = None

    def __eq__(self, other):
>       return self.items == other.items
E       AttributeError: 'NoneType' object has no attribute 'items'

dns/set.py:167: AttributeError

test_set.py::SetTestCase::testIntersection2

test_set.py::SetTestCase::testIntersection2
self = 

    def testIntersection2(self):
        s1 = S([0, 1, 2, 3])
        s2 = S([1, 2, 3, 4])
        e = S([1, 2, 3])
>       self.assertEqual(s1 & s2, e)

tests/test_set.py:74: 
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 

self = dns.set.Set([]), other = None

    def __eq__(self, other):
>       return self.items == other.items
E       AttributeError: 'NoneType' object has no attribute 'items'

dns/set.py:167: AttributeError

test_set.py::SetTestCase::testIntersection3

test_set.py::SetTestCase::testIntersection3
self = 

    def testIntersection3(self):
        s1 = S([1, 2, 3])
        s2 = S([])
        e = S([])
>       self.assertEqual(s1 & s2, e)

tests/test_set.py:80: 
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 

self = dns.set.Set([]), other = None

    def __eq__(self, other):
>       return self.items == other.items
E       AttributeError: 'NoneType' object has no attribute 'items'

dns/set.py:167: AttributeError

test_set.py::SetTestCase::testIntersection4

test_set.py::SetTestCase::testIntersection4
self = 

    def testIntersection4(self):
        s1 = S([1, 2, 3])
        s2 = S([5, 4])
        e = S([])
>       self.assertEqual(s1 & s2, e)

tests/test_set.py:86: 
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 

self = dns.set.Set([]), other = None

    def __eq__(self, other):
>       return self.items == other.items
E       AttributeError: 'NoneType' object has no attribute 'items'

dns/set.py:167: AttributeError

test_set.py::SetTestCase::testLen2

test_set.py::SetTestCase::testLen2
self = 

    def testLen2(self):
        s1 = S([1, 2, 3])
>       self.assertEqual(len(s1), 3)
E       AssertionError: 0 != 3

tests/test_set.py:34: AssertionError

test_set.py::SetTestCase::testLen3

test_set.py::SetTestCase::testLen3
self = 

    def testLen3(self):
        s1 = S([1, 2, 3, 3, 3])
>       self.assertEqual(len(s1), 3)
E       AssertionError: 0 != 3

tests/test_set.py:38: AssertionError

test_set.py::SetTestCase::testPop

test_set.py::SetTestCase::testPop
self = 

    def testPop(self):
        original = S([1, 2, 3])
        s1 = original.copy()
>       item = s1.pop()
E       AttributeError: 'NoneType' object has no attribute 'pop'

tests/test_set.py:225: AttributeError

test_set.py::SetTestCase::testRemoveNonexistent

test_set.py::SetTestCase::testRemoveNonexistent
self = 

    def testRemoveNonexistent(self):
        s1 = S([1, 2, 3])
        s2 = S([1, 2, 3])
>       with self.assertRaises(ValueError):
E       AssertionError: ValueError not raised

tests/test_set.py:280: AssertionError

test_set.py::SetTestCase::testSubset1

test_set.py::SetTestCase::testSubset1
self = 

    def testSubset1(self):
        s1 = S([1, 2, 3])
        s2 = S([3, 2, 1])
>       self.assertTrue(s1.issubset(s2))
E       AssertionError: None is not true

tests/test_set.py:152: AssertionError

test_set.py::SetTestCase::testSubset2

test_set.py::SetTestCase::testSubset2
self = 

    def testSubset2(self):
        s1 = S([1, 2, 3])
>       self.assertTrue(s1.issubset(s1))
E       AssertionError: None is not true

tests/test_set.py:156: AssertionError

test_set.py::SetTestCase::testSubset3

test_set.py::SetTestCase::testSubset3
self = 

    def testSubset3(self):
        s1 = S([])
        s2 = S([1, 2, 3])
>       self.assertTrue(s1.issubset(s2))
E       AssertionError: None is not true

tests/test_set.py:161: AssertionError

test_set.py::SetTestCase::testSubset4

test_set.py::SetTestCase::testSubset4
self = 

    def testSubset4(self):
        s1 = S([1])
        s2 = S([1, 2, 3])
>       self.assertTrue(s1.issubset(s2))
E       AssertionError: None is not true

tests/test_set.py:166: AssertionError

test_set.py::SetTestCase::testSubset5

test_set.py::SetTestCase::testSubset5
self = 

    def testSubset5(self):
        s1 = S([])
        s2 = S([])
>       self.assertTrue(s1.issubset(s2))
E       AssertionError: None is not true

tests/test_set.py:171: AssertionError

test_set.py::SetTestCase::testSuperset1

test_set.py::SetTestCase::testSuperset1
self = 

    def testSuperset1(self):
        s1 = S([1, 2, 3])
        s2 = S([3, 2, 1])
>       self.assertTrue(s1.issuperset(s2))
E       AssertionError: None is not true

tests/test_set.py:181: AssertionError

test_set.py::SetTestCase::testSuperset2

test_set.py::SetTestCase::testSuperset2
self = 

    def testSuperset2(self):
        s1 = S([1, 2, 3])
>       self.assertTrue(s1.issuperset(s1))
E       AssertionError: None is not true

tests/test_set.py:185: AssertionError

test_set.py::SetTestCase::testSuperset3

test_set.py::SetTestCase::testSuperset3
self = 

    def testSuperset3(self):
        s1 = S([1, 2, 3])
        s2 = S([])
>       self.assertTrue(s1.issuperset(s2))
E       AssertionError: None is not true

tests/test_set.py:190: AssertionError

test_set.py::SetTestCase::testSuperset4

test_set.py::SetTestCase::testSuperset4
self = 

    def testSuperset4(self):
        s1 = S([1, 2, 3])
        s2 = S([1])
>       self.assertTrue(s1.issuperset(s2))
E       AssertionError: None is not true

tests/test_set.py:195: AssertionError

test_set.py::SetTestCase::testSuperset5

test_set.py::SetTestCase::testSuperset5
self = 

    def testSuperset5(self):
        s1 = S([])
        s2 = S([])
>       self.assertTrue(s1.issuperset(s2))
E       AssertionError: None is not true

tests/test_set.py:200: AssertionError

test_set.py::SetTestCase::testSymmetricDifference1

test_set.py::SetTestCase::testSymmetricDifference1
self = 

    def testSymmetricDifference1(self):
        s1 = S([1, 2, 3])
        s2 = S([5, 4])
        e = S([1, 2, 3, 4, 5])
>       self.assertEqual(s1 ^ s2, e)

tests/test_set.py:116: 
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 

self = dns.set.Set([]), other = None

    def __eq__(self, other):
>       return self.items == other.items
E       AttributeError: 'NoneType' object has no attribute 'items'

dns/set.py:167: AttributeError

test_set.py::SetTestCase::testSymmetricDifference2

test_set.py::SetTestCase::testSymmetricDifference2
self = 

    def testSymmetricDifference2(self):
        s1 = S([1, 2, 3])
        s2 = S([])
        e = S([1, 2, 3])
>       self.assertEqual(s1 ^ s2, e)

tests/test_set.py:122: 
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 

self = dns.set.Set([]), other = None

    def __eq__(self, other):
>       return self.items == other.items
E       AttributeError: 'NoneType' object has no attribute 'items'

dns/set.py:167: AttributeError

test_set.py::SetTestCase::testSymmetricDifference3

test_set.py::SetTestCase::testSymmetricDifference3
self = 

    def testSymmetricDifference3(self):
        s1 = S([1, 2, 3])
        s2 = S([3, 2])
        e = S([1])
>       self.assertEqual(s1 ^ s2, e)

tests/test_set.py:128: 
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 

self = dns.set.Set([]), other = None

    def __eq__(self, other):
>       return self.items == other.items
E       AttributeError: 'NoneType' object has no attribute 'items'

dns/set.py:167: AttributeError

test_set.py::SetTestCase::testSymmetricDifference4

test_set.py::SetTestCase::testSymmetricDifference4
self = 

    def testSymmetricDifference4(self):
        s1 = S([1, 2, 3])
        s2 = S([3, 2, 1])
        e = S([])
>       self.assertEqual(s1 ^ s2, e)

tests/test_set.py:134: 
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 

self = dns.set.Set([]), other = None

    def __eq__(self, other):
>       return self.items == other.items
E       AttributeError: 'NoneType' object has no attribute 'items'

dns/set.py:167: AttributeError

test_set.py::SetTestCase::testUnion1

test_set.py::SetTestCase::testUnion1
self = 

    def testUnion1(self):
        s1 = S([1, 2, 3])
        s2 = S([1, 2, 3])
        e = S([1, 2, 3])
>       self.assertEqual(s1 | s2, e)

tests/test_set.py:44: 
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 

self = dns.set.Set([]), other = None

    def __eq__(self, other):
>       return self.items == other.items
E       AttributeError: 'NoneType' object has no attribute 'items'

dns/set.py:167: AttributeError

test_set.py::SetTestCase::testUnion2

test_set.py::SetTestCase::testUnion2
self = 

    def testUnion2(self):
        s1 = S([1, 2, 3])
        s2 = S([])
        e = S([1, 2, 3])
>       self.assertEqual(s1 | s2, e)

tests/test_set.py:50: 
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 

self = dns.set.Set([]), other = None

    def __eq__(self, other):
>       return self.items == other.items
E       AttributeError: 'NoneType' object has no attribute 'items'

dns/set.py:167: AttributeError

test_set.py::SetTestCase::testUnion3

test_set.py::SetTestCase::testUnion3
self = 

    def testUnion3(self):
        s1 = S([1, 2, 3])
        s2 = S([3, 4])
        e = S([1, 2, 3, 4])
>       self.assertEqual(s1 | s2, e)

tests/test_set.py:56: 
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 

self = dns.set.Set([]), other = None

    def __eq__(self, other):
>       return self.items == other.items
E       AttributeError: 'NoneType' object has no attribute 'items'

dns/set.py:167: AttributeError

test_set.py::SetTestCase::testUnionPlusSyntax

test_set.py::SetTestCase::testUnionPlusSyntax
self = 

    def testUnionPlusSyntax(self):
        s1 = S([1, 2, 3])
        s2 = S([3, 4])
        e = S([1, 2, 3, 4])
>       self.assertEqual(s1 + s2, e)

tests/test_set.py:62: 
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 

self = dns.set.Set([]), other = None

    def __eq__(self, other):
>       return self.items == other.items
E       AttributeError: 'NoneType' object has no attribute 'items'

dns/set.py:167: AttributeError

test_ttl.py::TTLTestCase::test_bind_style_bad_unit

test_ttl.py::TTLTestCase::test_bind_style_bad_unit
self = 

    def test_bind_style_bad_unit(self):
>       with self.assertRaises(dns.ttl.BadTTL):
E       AssertionError: BadTTL not raised

tests/test_ttl.py:19: AssertionError

test_ttl.py::TTLTestCase::test_bind_style_leading_unit

test_ttl.py::TTLTestCase::test_bind_style_leading_unit
self = 

    def test_bind_style_leading_unit(self):
>       with self.assertRaises(dns.ttl.BadTTL):
E       AssertionError: BadTTL not raised

tests/test_ttl.py:27: AssertionError

test_ttl.py::TTLTestCase::test_bind_style_no_unit

test_ttl.py::TTLTestCase::test_bind_style_no_unit
self = 

    def test_bind_style_no_unit(self):
>       with self.assertRaises(dns.ttl.BadTTL):
E       AssertionError: BadTTL not raised

tests/test_ttl.py:23: AssertionError

test_ttl.py::TTLTestCase::test_bind_style_ok

test_ttl.py::TTLTestCase::test_bind_style_ok
self = 

    def test_bind_style_ok(self):
        ttl = dns.ttl.from_text("2w1d1h1m1s")
>       self.assertEqual(ttl, 2 * 604800 + 86400 + 3600 + 60 + 1)
E       AssertionError: None != 1299661

tests/test_ttl.py:11: AssertionError

test_ttl.py::TTLTestCase::test_bind_style_ok2

test_ttl.py::TTLTestCase::test_bind_style_ok2
self = 

    def test_bind_style_ok2(self):
        # no one should do this, but it is legal! :)
        ttl = dns.ttl.from_text("1s2w1m1d1h")
>       self.assertEqual(ttl, 2 * 604800 + 86400 + 3600 + 60 + 1)
E       AssertionError: None != 1299661

tests/test_ttl.py:16: AssertionError

test_ttl.py::TTLTestCase::test_bind_style_unit_without_digits

test_ttl.py::TTLTestCase::test_bind_style_unit_without_digits
self = 

    def test_bind_style_unit_without_digits(self):
>       with self.assertRaises(dns.ttl.BadTTL):
E       AssertionError: BadTTL not raised

tests/test_ttl.py:31: AssertionError

test_ttl.py::TTLTestCase::test_empty

test_ttl.py::TTLTestCase::test_empty
self = 

    def test_empty(self):
>       with self.assertRaises(dns.ttl.BadTTL):
E       AssertionError: BadTTL not raised

tests/test_ttl.py:35: AssertionError

Patch diff

diff --git a/dns/resolver.py b/dns/resolver.py
index 1d1d63b..6efbd88 100644
--- a/dns/resolver.py
+++ b/dns/resolver.py
@@ -50,7 +50,7 @@ class NXDOMAIN(dns.exception.DNSException):
     @property
     def canonical_name(self):
         """Return the unresolved canonical name."""
-        pass
+        return self.qnames()[0] if self.qnames() else None

     def __add__(self, e_nx):
         """Augment by results from another NXDOMAIN exception."""
@@ -69,7 +69,7 @@ class NXDOMAIN(dns.exception.DNSException):

         Returns a list of ``dns.name.Name``.
         """
-        pass
+        return self.kwargs.get('qnames', [])

     def responses(self):
         """A map from queried names to their NXDOMAIN responses.
@@ -77,14 +77,14 @@ class NXDOMAIN(dns.exception.DNSException):
         Returns a dict mapping a ``dns.name.Name`` to a
         ``dns.message.Message``.
         """
-        pass
+        return self.kwargs.get('responses', {})

     def response(self, qname):
         """The response for query *qname*.

         Returns a ``dns.message.Message``.
         """
-        pass
+        return self.responses().get(qname)

 class YXDOMAIN(dns.exception.DNSException):
     """The DNS query name is too long after DNAME substitution."""
@@ -92,7 +92,7 @@ ErrorTuple = Tuple[Optional[str], bool, int, Union[Exception, str], Optional[dns

 def _errors_to_text(errors: List[ErrorTuple]) -> List[str]:
     """Turn a resolution errors trace into a list of text."""
-    pass
+    return [f"{nameserver}: {error}" for nameserver, _, _, error, _ in errors if nameserver is not None]

 class LifetimeTimeout(dns.exception.Timeout):
     """The resolution lifetime expired."""
@@ -806,4 +806,4 @@ def override_system_resolver(resolver: Optional[Resolver]=None) -> None:

 def restore_system_resolver() -> None:
     """Undo the effects of prior override_system_resolver()."""
-    pass
\ No newline at end of file
+    pass