mirror of
https://github.com/dgibson/dtc.git
synced 2025-10-14 00:37:41 -04:00
pylibfdt: Avoid accessing the internal _fdt member in tests
We can use the accessor now, so do so. Signed-off-by: Simon Glass <sjg@chromium.org> Reviewed-by: David Gibson <david@gibson.dropbear.id.au> Signed-off-by: David Gibson <david@gibson.dropbear.id.au>
This commit is contained in:
parent
9aafa33d99
commit
481246a0c1
1 changed files with 2 additions and 3 deletions
|
@ -336,10 +336,9 @@ class PyLibfdtTests(unittest.TestCase):
|
||||||
|
|
||||||
def testIntegers(self):
|
def testIntegers(self):
|
||||||
"""Check that integers can be passed and returned"""
|
"""Check that integers can be passed and returned"""
|
||||||
self.assertEquals(0, libfdt.fdt_get_phandle(self.fdt.as_bytearray(), 0))
|
self.assertEquals(0, libfdt.fdt_get_phandle(self.fdt._fdt, 0))
|
||||||
node2 = self.fdt.path_offset('/subnode@2')
|
node2 = self.fdt.path_offset('/subnode@2')
|
||||||
self.assertEquals(
|
self.assertEquals(0x2000, libfdt.fdt_get_phandle(self.fdt._fdt, node2))
|
||||||
0x2000, libfdt.fdt_get_phandle(self.fdt.as_bytearray(), node2))
|
|
||||||
|
|
||||||
def testGetPhandle(self):
|
def testGetPhandle(self):
|
||||||
"""Test for the get_phandle() method"""
|
"""Test for the get_phandle() method"""
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue