Add test case for source_generator
Run test.py in .travis.yml