Make running tests easier

Import pyaml from the parent directory when runnings tests.
Fix test case failure due to sorting