From: Olof Johansson Date: Tue, 19 Jan 2016 15:04:11 +0000 (+0100) Subject: tests/codeparser.py: Add filename/lineno flags to test variable X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=4eb15605a1436631b3673bdba39af14bcb3a0e6d;p=thirdparty%2Fopenembedded%2Fopenembedded-core-contrib.git tests/codeparser.py: Add filename/lineno flags to test variable A recent change in bitbake added filename/lineno information to the parameters of bb.data.build_dependencies(). The codeparser tests required a little adaption to the changes, adding the flags to the FOO variable used in the tests. The error seen when running the tests is a TypeError exception raised in bb.codeparser: TypeError: int() argument must be a string or a number, not 'NoneType' Signed-off-by: Olof Johansson Signed-off-by: Richard Purdie --- diff --git a/lib/bb/tests/codeparser.py b/lib/bb/tests/codeparser.py index 4454bc51edb..bb820e40378 100644 --- a/lib/bb/tests/codeparser.py +++ b/lib/bb/tests/codeparser.py @@ -293,7 +293,12 @@ bb.data.getVar(a(), d, False) def test_python(self): self.d.setVar("FOO", self.pydata) self.setEmptyVars(["inexpand", "a", "test2", "test"]) - self.d.setVarFlags("FOO", {"func": True, "python": True}) + self.d.setVarFlags("FOO", { + "func": True, + "python": True, + "lineno": 1, + "filename": "example.bb", + }) deps, values = bb.data.build_dependencies("FOO", set(self.d.keys()), set(), set(), self.d)