Fix bug in __repr__
Fix test error under Python 2.6 where assertLessEqual not defined