aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDavid Gibson <david@gibson.dropbear.id.au>2018-11-23 17:47:41 +1100
committerDavid Gibson <david@gibson.dropbear.id.au>2018-11-23 17:47:41 +1100
commit08380fc43aa2dd7e01b65bd87e8b20519db0d397 (patch)
tree0c14da0d60d614c7c4af2a90ca9697a205846ba6
parent8113c00b99d303c8073a2493f6b8978600e54967 (diff)
downloaddtc-08380fc43aa2dd7e01b65bd87e8b20519db0d397.zip
dtc-08380fc43aa2dd7e01b65bd87e8b20519db0d397.tar.gz
dtc-08380fc43aa2dd7e01b65bd87e8b20519db0d397.tar.bz2
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>
-rw-r--r--tests/pylibfdt_tests.py4
1 files changed, 2 insertions, 2 deletions
diff --git a/tests/pylibfdt_tests.py b/tests/pylibfdt_tests.py
index fbb1ce2..34c680d 100644
--- a/tests/pylibfdt_tests.py
+++ b/tests/pylibfdt_tests.py
@@ -69,7 +69,7 @@ TEST_ADDR_2H = 0
TEST_ADDR_2L = 123456789
TEST_ADDR_2 = (TEST_ADDR_2H << 32) | TEST_ADDR_2L
TEST_SIZE_2H = 0
-TEST_SIZE_2L = 010000
+TEST_SIZE_2L = 0o10000
TEST_SIZE_2 = (TEST_SIZE_2H << 32) | TEST_SIZE_2L
TEST_VALUE_1 = 0xdeadbeef
@@ -422,7 +422,7 @@ class PyLibfdtBasicTests(unittest.TestCase):
self.assertEquals(2, self.fdt.num_mem_rsv())
self.assertEquals([ 0xdeadbeef00000000, 0x100000],
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):
"""Test that we can create an empty tree"""