Re: [PATCH 08/10] pylibfdt: Avoid accessing the internal _fdt member in tests

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]



On Wed, May 23, 2018 at 10:03:44PM -0600, Simon Glass wrote:
> We can use the accessor now, so do so.
> 
> Signed-off-by: Simon Glass <sjg@xxxxxxxxxxxx>

Reviewed-by: David Gibson <david@xxxxxxxxxxxxxxxxxxxxx>

> ---
> 
>  tests/pylibfdt_tests.py | 5 ++---
>  1 file changed, 2 insertions(+), 3 deletions(-)
> 
> diff --git a/tests/pylibfdt_tests.py b/tests/pylibfdt_tests.py
> index 497124b..a6d9430 100644
> --- a/tests/pylibfdt_tests.py
> +++ b/tests/pylibfdt_tests.py
> @@ -338,10 +338,9 @@ class PyLibfdtTests(unittest.TestCase):
>  
>      def testIntegers(self):
>          """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')
> -        self.assertEquals(
> -                0x2000, libfdt.fdt_get_phandle(self.fdt.as_bytearray(), node2))
> +        self.assertEquals(0x2000, libfdt.fdt_get_phandle(self.fdt._fdt, node2))
>  
>      def testGetPhandle(self):
>          """Test for the get_phandle() method"""

-- 
David Gibson			| I'll have my music baroque, and my code
david AT gibson.dropbear.id.au	| minimalist, thank you.  NOT _the_ _other_
				| _way_ _around_!
http://www.ozlabs.org/~dgibson

Attachment: signature.asc
Description: PGP signature


[Index of Archives]     [Device Tree]     [Device Tree Spec]     [Linux Driver Backports]     [Video for Linux]     [Linux USB Devel]     [Linux Audio Users]     [Linux Kernel]     [Linux SCSI]     [Yosemite Backpacking]

  Powered by Linux