def testYielding(self): for inp, out in [ ([], []), ('x', ['x']), ([[]], []), (' x\n y', ['x', 'y']), (['x\n\n', 'y'], ['x', 'y']), ]: assert list(pkg_resources.yield_lines(inp)) == out