From: Noel Power Date: Sat, 4 Aug 2018 16:01:24 +0000 (+0100) Subject: python/samba/tests: PY2/PY3 port samba.tests.dcerpc.integer X-Git-Tag: tdb-1.3.17~1250 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=95dbe1177fd82e3a553ac98fd25ee06ca20f8776;p=thirdparty%2Fsamba.git python/samba/tests: PY2/PY3 port samba.tests.dcerpc.integer Python3 no longer has a long type so the 'L' postfix is no longer valid. Additionally in python2 an int that exceeds will be transparently converted into a long when necessary --- diff --git a/python/samba/tests/dcerpc/integer.py b/python/samba/tests/dcerpc/integer.py index a56bf7d3687..682edc1a67e 100644 --- a/python/samba/tests/dcerpc/integer.py +++ b/python/samba/tests/dcerpc/integer.py @@ -26,7 +26,7 @@ class IntegerTests(samba.tests.TestCase): def test_uint32_into_hyper(self): s = server_id.server_id() s.unique_id = server_id.NONCLUSTER_VNN - self.assertEquals(s.unique_id, 0xFFFFFFFFL) + self.assertEquals(s.unique_id, 0xFFFFFFFF) def test_int_into_hyper(self): s = server_id.server_id() @@ -68,7 +68,7 @@ class IntegerTests(samba.tests.TestCase): def test_long_into_int32(self): s = srvsvc.NetRemoteTODInfo() - s.timezone = 5L + s.timezone = 5 self.assertEquals(s.timezone, 5) def test_larger_long_int_into_int32(self): @@ -188,12 +188,12 @@ class IntegerTests(samba.tests.TestCase): def test_larger_int_into_int64(self): s = samr.DomInfo1() s.max_password_age = server_id.NONCLUSTER_VNN - self.assertEquals(s.max_password_age, 0xFFFFFFFFL) + self.assertEquals(s.max_password_age, 0xFFFFFFFF) def test_larger_negative_int_into_int64(self): s = samr.DomInfo1() s.max_password_age = -2147483649 - self.assertEquals(s.max_password_age, -2147483649L) + self.assertEquals(s.max_password_age, -2147483649) def test_int_list_over_list(self): g = misc.GUID() @@ -202,7 +202,7 @@ class IntegerTests(samba.tests.TestCase): def test_long_int_list_over_uint8_list(self): g = misc.GUID() - g.node = [5L, 0, 5, 0, 7, 4] + g.node = [5, 0, 5, 0, 7, 4] self.assertEqual(g.node[0], 5) def test_negative_list_over_uint8_list(self):