More elaborate tests of generators, including one with a return