nose2.compatΒΆ

unittest/unittest2 compatibility wrapper.

Anything internal to nose2 must import unittest from here to be certain that it is using unittest2 when run on older Python versions.

Yes:

from nose2.compat import unittest

NO:

import unittest

NO:

import unittest2