fixing tests to work with python 2 and 3. Adding regexp checking for tree naming