def testGetKnownNumberTypes(self): import numpy import sys assert _GetKnownNumberTypes() == (int, float, long, numpy.number) numpy_module = sys.modules['numpy'] try: sys.modules['numpy'] = None assert _GetKnownNumberTypes() == (int, float, long) finally: sys.modules['numpy'] = numpy_module
def testGetKnownNumberTypes(self): import sys numpy = pytest.importorskip('numpy') assert _GetKnownNumberTypes() == (int, float, long, complex, numpy.number) numpy_module = sys.modules['numpy'] try: sys.modules['numpy'] = None assert _GetKnownNumberTypes() == (int, float, long, complex) finally: sys.modules['numpy'] = numpy_module
def testGetKnownNumberTypes(self): import numpy import sys assert _GetKnownNumberTypes() == (int, float, long, numpy.number) numpy_module = sys.modules['numpy'] try: sys.modules['numpy'] = None assert _GetKnownNumberTypes() == (int, float, long) finally: sys.modules['numpy'] = numpy_module