Skip to content
Commit b13b5b8b authored by Martí Bolívar's avatar Martí Bolívar Committed by Kumar Gala
Browse files

dtlib: fix include_path edge case



The documentation says DT.__init__ takes any iterable for the
include_path, but this leads to bad results when you pass it something
other than a 'real' sequence (list/tuple/etc), like a generator:

>>> dt = DT('/tmp/foo.dts', (x for x in ['a', 'b', 'c']))
>>> repr(dt)
"DT(filename='/tmp/foo.dts', include_path=<generator object ...>)"

Make a copy in list form just to avoid things like this.

Add a test for this and relax the regular expression in the existing
test case related to this.

Signed-off-by: default avatarMartí Bolívar <marti.bolivar@nordicsemi.no>
parent 628fb904
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please to comment