fixed metrics.doctest for Python 2.6