test: move test in tests. add test doc and check stderr.
- using python3 for test doc