From: Martin Date: Sat, 2 Jul 2016 00:30:08 +0000 (+0200) Subject: Pylint: tests: fix redefined functions X-Git-Tag: v1.15.0~40^2~14 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=d3fc1892555de51c5e006d9ee10351d525c02d2c;p=thirdparty%2Fdnspython.git Pylint: tests: fix redefined functions This fix increases number of tests from Ran 424 tests in 13.300s to Ran 435 tests in 13.679s --- diff --git a/tests/test_flags.py b/tests/test_flags.py index 2ed53495..9d230ac1 100644 --- a/tests/test_flags.py +++ b/tests/test_flags.py @@ -41,10 +41,10 @@ class FlagsTestCase(unittest.TestCase): self.failUnless(dns.rcode.from_flags(0, 0x01000000) == \ dns.rcode.BADVERS) - def test_rcode6(self): + def test_rcode7(self): self.failUnless(dns.rcode.from_flags(5, 0) == dns.rcode.REFUSED) - def test_rcode7(self): + def test_rcode8(self): def bad(): dns.rcode.to_flags(4096) self.failUnlessRaises(ValueError, bad) diff --git a/tests/test_grange.py b/tests/test_grange.py index bdb64b70..567f8a34 100644 --- a/tests/test_grange.py +++ b/tests/test_grange.py @@ -80,7 +80,7 @@ class GRangeTestCase(unittest.TestCase): dns.grange.from_text('%s-%d/%d' % (start, stop, step)) self.assertRaises(dns.exception.SyntaxError, bad) - def testFailFromText2(self): + def testFailFromText3(self): def bad(): start = 1 stop = 4 diff --git a/tests/test_name.py b/tests/test_name.py index b01544e0..2cfabda3 100644 --- a/tests/test_name.py +++ b/tests/test_name.py @@ -116,7 +116,7 @@ class NameTestCase(unittest.TestCase): def testAbs3(self): self.failUnless(self.origin.is_absolute()) - def testAbs3(self): + def testAbs4(self): n = dns.name.from_text('foo', origin=None) self.failUnless(not n.is_absolute()) @@ -307,28 +307,28 @@ class NameTestCase(unittest.TestCase): r = n1 + n2 self.failUnless(r == e) - def testConcat2(self): + def testConcat3(self): n1 = dns.name.Name([]) n2 = dns.name.Name(['a', 'b']) e = dns.name.Name(['a', 'b']) r = n1 + n2 self.failUnless(r == e) - def testConcat3(self): + def testConcat4(self): n1 = dns.name.Name(['a', 'b', '']) n2 = dns.name.Name([]) e = dns.name.Name(['a', 'b', '']) r = n1 + n2 self.failUnless(r == e) - def testConcat4(self): + def testConcat5(self): n1 = dns.name.Name(['a', 'b']) n2 = dns.name.Name(['c', '']) e = dns.name.Name(['a', 'b', 'c', '']) r = n1 + n2 self.failUnless(r == e) - def testConcat5(self): + def testConcat6(self): def bad(): n1 = dns.name.Name(['a', 'b', '']) n2 = dns.name.Name(['c']) @@ -559,7 +559,7 @@ class NameTestCase(unittest.TestCase): self.failUnless(n1 == en1 and cused1 == ecused1 and \ n2 == en2 and cused2 == ecused2) - def testFromWire1(self): + def testFromWire2(self): w = b'\x03foo\x00\x01a\xc0\x00\x01b\xc0\x05' current = 0 (n1, cused1) = dns.name.from_wire(w, current) diff --git a/tests/test_ntoaaton.py b/tests/test_ntoaaton.py index b45689c8..ac72403c 100644 --- a/tests/test_ntoaaton.py +++ b/tests/test_ntoaaton.py @@ -73,19 +73,19 @@ class NtoAAtoNTestCase(unittest.TestCase): a = aton6('1:2:3:4:5:6:7:8:9') self.failUnlessRaises(dns.exception.SyntaxError, bad) - def test_aton1(self): + def test_aton6(self): a = aton6('::') self.assertEqual(a, b'\x00' * 16) - def test_aton2(self): + def test_aton7(self): a = aton6('::1') self.assertEqual(a, b'\x00' * 15 + b'\x01') - def test_aton3(self): + def test_aton8(self): a = aton6('::10.0.0.1') self.assertEqual(a, b'\x00' * 12 + b'\x0a\x00\x00\x01') - def test_aton4(self): + def test_aton9(self): a = aton6('abcd::dcba') self.assertEqual(a, b'\xab\xcd' + b'\x00' * 12 + b'\xdc\xba') diff --git a/tests/test_rdtypeandclass.py b/tests/test_rdtypeandclass.py index e040d8d2..733eda56 100644 --- a/tests/test_rdtypeandclass.py +++ b/tests/test_rdtypeandclass.py @@ -55,7 +55,7 @@ class RdTypeAndClassTestCase(unittest.TestCase): def test_class_totext1(self): self.failUnless(dns.rdataclass.to_text(dns.rdataclass.IN) == 'IN') - def test_class_totext1(self): + def test_class_totext2(self): self.failUnless(dns.rdataclass.to_text(999) == 'CLASS999') def test_class_totext_bounds1(self): @@ -109,7 +109,7 @@ class RdTypeAndClassTestCase(unittest.TestCase): def test_type_totext1(self): self.failUnless(dns.rdatatype.to_text(dns.rdatatype.A) == 'A') - def test_type_totext1(self): + def test_type_totext2(self): self.failUnless(dns.rdatatype.to_text(999) == 'TYPE999') def test_type_totext_bounds1(self):