source code the test.py for function test