We ran across the problem, that we have some complex code in one of our .bbclass files in our project, and would like to unit test it. But we don't really see a way to achieve this. Right now we basically copied out the python code into it's own file, and ran some tests over it, but this is not really a solution for a productive environment.
foo.bbclass
def foobar(some_text): # do some transformations with the text and return it return some_text[:2:-3].upper()SOME_VARIABLE := "${foobar("asdfg")}"Obviously symlinking the file to .py and importing it doesn't work, since the .bbclass syntax contains elements the python parser will choke on. So is there a way to apply tests to it?