summaryrefslogtreecommitdiff
path: root/tools/dtoc/test_fdt.py
diff options
context:
space:
mode:
authorSimon Glass <sjg@chromium.org>2019-05-17 22:00:33 -0600
committerSimon Glass <sjg@chromium.org>2019-07-10 16:52:58 -0600
commit194b8d5e71a41dbb839fdaa49677b146e6a0fb5d (patch)
tree57a0387ce8d1b8be0bc5757acda6b6e9c0c2482d /tools/dtoc/test_fdt.py
parent1953ce75312ab50988f2c81f7250c99dfc2ed52b (diff)
dtoc: Use GetBytes() to obtain repeating bytes
Use this helper function which works on both Python 2 and Python 3. Signed-off-by: Simon Glass <sjg@chromium.org>
Diffstat (limited to 'tools/dtoc/test_fdt.py')
-rwxr-xr-xtools/dtoc/test_fdt.py2
1 files changed, 1 insertions, 1 deletions
diff --git a/tools/dtoc/test_fdt.py b/tools/dtoc/test_fdt.py
index 2d1d7dc452c..79f97d8013c 100755
--- a/tools/dtoc/test_fdt.py
+++ b/tools/dtoc/test_fdt.py
@@ -279,7 +279,7 @@ class TestProp(unittest.TestCase):
"""Tests the GetEmpty() function for the various supported types"""
self.assertEqual(True, fdt.Prop.GetEmpty(fdt.TYPE_BOOL))
self.assertEqual(chr(0), fdt.Prop.GetEmpty(fdt.TYPE_BYTE))
- self.assertEqual(chr(0) * 4, fdt.Prop.GetEmpty(fdt.TYPE_INT))
+ self.assertEqual(tools.GetBytes(0, 4), fdt.Prop.GetEmpty(fdt.TYPE_INT))
self.assertEqual('', fdt.Prop.GetEmpty(fdt.TYPE_STRING))
def testGetOffset(self):