mirror of
https://github.com/dgibson/dtc.git
synced 2025-10-14 00:37:41 -04:00
tests: Use modern octal literals for Python
Python3 removes support for C-style octal literals, using 0oXXXX instead. Python2 also supports this form, so move to the new style. Reported-by: Lumir Balhar <lbalhar@redhat.com> Signed-off-by: David Gibson <david@gibson.dropbear.id.au>
This commit is contained in:
parent
8113c00b99
commit
08380fc43a
1 changed files with 2 additions and 2 deletions
|
@ -69,7 +69,7 @@ TEST_ADDR_2H = 0
|
||||||
TEST_ADDR_2L = 123456789
|
TEST_ADDR_2L = 123456789
|
||||||
TEST_ADDR_2 = (TEST_ADDR_2H << 32) | TEST_ADDR_2L
|
TEST_ADDR_2 = (TEST_ADDR_2H << 32) | TEST_ADDR_2L
|
||||||
TEST_SIZE_2H = 0
|
TEST_SIZE_2H = 0
|
||||||
TEST_SIZE_2L = 010000
|
TEST_SIZE_2L = 0o10000
|
||||||
TEST_SIZE_2 = (TEST_SIZE_2H << 32) | TEST_SIZE_2L
|
TEST_SIZE_2 = (TEST_SIZE_2H << 32) | TEST_SIZE_2L
|
||||||
|
|
||||||
TEST_VALUE_1 = 0xdeadbeef
|
TEST_VALUE_1 = 0xdeadbeef
|
||||||
|
@ -422,7 +422,7 @@ class PyLibfdtBasicTests(unittest.TestCase):
|
||||||
self.assertEquals(2, self.fdt.num_mem_rsv())
|
self.assertEquals(2, self.fdt.num_mem_rsv())
|
||||||
self.assertEquals([ 0xdeadbeef00000000, 0x100000],
|
self.assertEquals([ 0xdeadbeef00000000, 0x100000],
|
||||||
self.fdt.get_mem_rsv(0))
|
self.fdt.get_mem_rsv(0))
|
||||||
self.assertEquals([123456789, 010000], self.fdt.get_mem_rsv(1))
|
self.assertEquals([123456789, 0o10000], self.fdt.get_mem_rsv(1))
|
||||||
|
|
||||||
def testEmpty(self):
|
def testEmpty(self):
|
||||||
"""Test that we can create an empty tree"""
|
"""Test that we can create an empty tree"""
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue