Added test cases for degree in polytools.py