Python nose 模块,__versioninfo__() 实例源码

我们从Python开源项目中,提取了以下13个代码示例,用于说明如何使用nose.__versioninfo__()

项目:radar    作者:amoose136    | 项目源码 | 文件源码
def import_nose():
    """ Import nose only when needed.
    """
    fine_nose = True
    minimum_nose_version = (1, 0, 0)
    try:
        import nose
    except ImportError:
        fine_nose = False
    else:
        if nose.__versioninfo__ < minimum_nose_version:
            fine_nose = False

    if not fine_nose:
        msg = ('Need nose >= %d.%d.%d for tests - see '
               'http://somethingaboutorange.com/mrl/projects/nose' %
               minimum_nose_version)
        raise ImportError(msg)

    return nose
项目:radar    作者:amoose136    | 项目源码 | 文件源码
def _show_system_info(self):
        nose = import_nose()

        import numpy
        print("NumPy version %s" % numpy.__version__)
        relaxed_strides = numpy.ones((10, 1), order="C").flags.f_contiguous
        print("NumPy relaxed strides checking option:", relaxed_strides)
        npdir = os.path.dirname(numpy.__file__)
        print("NumPy is installed in %s" % npdir)

        if 'scipy' in self.package_name:
            import scipy
            print("SciPy version %s" % scipy.__version__)
            spdir = os.path.dirname(scipy.__file__)
            print("SciPy is installed in %s" % spdir)

        pyversion = sys.version.replace('\n', '')
        print("Python version %s" % pyversion)
        print("nose version %d.%d.%d" % nose.__versioninfo__)
项目:krpcScripts    作者:jwvanderbeck    | 项目源码 | 文件源码
def import_nose():
    """ Import nose only when needed.
    """
    fine_nose = True
    minimum_nose_version = (1, 0, 0)
    try:
        import nose
    except ImportError:
        fine_nose = False
    else:
        if nose.__versioninfo__ < minimum_nose_version:
            fine_nose = False

    if not fine_nose:
        msg = ('Need nose >= %d.%d.%d for tests - see '
               'http://somethingaboutorange.com/mrl/projects/nose' %
               minimum_nose_version)
        raise ImportError(msg)

    return nose
项目:krpcScripts    作者:jwvanderbeck    | 项目源码 | 文件源码
def _show_system_info(self):
        nose = import_nose()

        import numpy
        print("NumPy version %s" % numpy.__version__)
        relaxed_strides = numpy.ones((10, 1), order="C").flags.f_contiguous
        print("NumPy relaxed strides checking option:", relaxed_strides)
        npdir = os.path.dirname(numpy.__file__)
        print("NumPy is installed in %s" % npdir)

        if 'scipy' in self.package_name:
            import scipy
            print("SciPy version %s" % scipy.__version__)
            spdir = os.path.dirname(scipy.__file__)
            print("SciPy is installed in %s" % spdir)

        pyversion = sys.version.replace('\n', '')
        print("Python version %s" % pyversion)
        print("nose version %d.%d.%d" % nose.__versioninfo__)
项目:PyDataLondon29-EmbarrassinglyParallelDAWithAWSLambda    作者:SignalMedia    | 项目源码 | 文件源码
def import_nose():
    """ Import nose only when needed.
    """
    fine_nose = True
    minimum_nose_version = (0, 10, 0)
    try:
        import nose
    except ImportError:
        fine_nose = False
    else:
        if nose.__versioninfo__ < minimum_nose_version:
            fine_nose = False

    if not fine_nose:
        msg = ('Need nose >= %d.%d.%d for tests - see '
               'http://somethingaboutorange.com/mrl/projects/nose' %
               minimum_nose_version)
        raise ImportError(msg)

    return nose
项目:PyDataLondon29-EmbarrassinglyParallelDAWithAWSLambda    作者:SignalMedia    | 项目源码 | 文件源码
def _show_system_info(self):
        nose = import_nose()

        import numpy
        print("NumPy version %s" % numpy.__version__)
        relaxed_strides = numpy.ones((10, 1), order="C").flags.f_contiguous
        print("NumPy relaxed strides checking option:", relaxed_strides)
        npdir = os.path.dirname(numpy.__file__)
        print("NumPy is installed in %s" % npdir)

        if 'scipy' in self.package_name:
            import scipy
            print("SciPy version %s" % scipy.__version__)
            spdir = os.path.dirname(scipy.__file__)
            print("SciPy is installed in %s" % spdir)

        pyversion = sys.version.replace('\n', '')
        print("Python version %s" % pyversion)
        print("nose version %d.%d.%d" % nose.__versioninfo__)
项目:aws-lambda-numpy    作者:vitolimandibhrata    | 项目源码 | 文件源码
def import_nose():
    """ Import nose only when needed.
    """
    fine_nose = True
    minimum_nose_version = (0, 10, 0)
    try:
        import nose
    except ImportError:
        fine_nose = False
    else:
        if nose.__versioninfo__ < minimum_nose_version:
            fine_nose = False

    if not fine_nose:
        msg = ('Need nose >= %d.%d.%d for tests - see '
               'http://somethingaboutorange.com/mrl/projects/nose' %
               minimum_nose_version)
        raise ImportError(msg)

    return nose
项目:aws-lambda-numpy    作者:vitolimandibhrata    | 项目源码 | 文件源码
def _show_system_info(self):
        nose = import_nose()

        import numpy
        print("NumPy version %s" % numpy.__version__)
        relaxed_strides = numpy.ones((10, 1), order="C").flags.f_contiguous
        print("NumPy relaxed strides checking option:", relaxed_strides)
        npdir = os.path.dirname(numpy.__file__)
        print("NumPy is installed in %s" % npdir)

        if 'scipy' in self.package_name:
            import scipy
            print("SciPy version %s" % scipy.__version__)
            spdir = os.path.dirname(scipy.__file__)
            print("SciPy is installed in %s" % spdir)

        pyversion = sys.version.replace('\n', '')
        print("Python version %s" % pyversion)
        print("nose version %d.%d.%d" % nose.__versioninfo__)
项目:lambda-numba    作者:rlhotovy    | 项目源码 | 文件源码
def import_nose():
    """ Import nose only when needed.
    """
    fine_nose = True
    minimum_nose_version = (1, 0, 0)
    try:
        import nose
    except ImportError:
        fine_nose = False
    else:
        if nose.__versioninfo__ < minimum_nose_version:
            fine_nose = False

    if not fine_nose:
        msg = ('Need nose >= %d.%d.%d for tests - see '
               'http://somethingaboutorange.com/mrl/projects/nose' %
               minimum_nose_version)
        raise ImportError(msg)

    return nose
项目:lambda-numba    作者:rlhotovy    | 项目源码 | 文件源码
def _show_system_info(self):
        nose = import_nose()

        import numpy
        print("NumPy version %s" % numpy.__version__)
        relaxed_strides = numpy.ones((10, 1), order="C").flags.f_contiguous
        print("NumPy relaxed strides checking option:", relaxed_strides)
        npdir = os.path.dirname(numpy.__file__)
        print("NumPy is installed in %s" % npdir)

        if 'scipy' in self.package_name:
            import scipy
            print("SciPy version %s" % scipy.__version__)
            spdir = os.path.dirname(scipy.__file__)
            print("SciPy is installed in %s" % spdir)

        pyversion = sys.version.replace('\n', '')
        print("Python version %s" % pyversion)
        print("nose version %d.%d.%d" % nose.__versioninfo__)
项目:deliver    作者:orchestor    | 项目源码 | 文件源码
def import_nose():
    """ Import nose only when needed.
    """
    nose_is_good = True
    minimum_nose_version = (1, 0, 0)
    try:
        import nose
    except ImportError:
        nose_is_good = False
    else:
        if nose.__versioninfo__ < minimum_nose_version:
            nose_is_good = False

    if not nose_is_good:
        msg = ('Need nose >= %d.%d.%d for tests - see '
               'http://nose.readthedocs.io' %
               minimum_nose_version)
        raise ImportError(msg)

    return nose
项目:Alfred    作者:jkachhadia    | 项目源码 | 文件源码
def import_nose():
    """ Import nose only when needed.
    """
    fine_nose = True
    minimum_nose_version = (1, 0, 0)
    try:
        import nose
    except ImportError:
        fine_nose = False
    else:
        if nose.__versioninfo__ < minimum_nose_version:
            fine_nose = False

    if not fine_nose:
        msg = ('Need nose >= %d.%d.%d for tests - see '
               'http://somethingaboutorange.com/mrl/projects/nose' %
               minimum_nose_version)
        raise ImportError(msg)

    return nose
项目:Alfred    作者:jkachhadia    | 项目源码 | 文件源码
def _show_system_info(self):
        nose = import_nose()

        import numpy
        print("NumPy version %s" % numpy.__version__)
        relaxed_strides = numpy.ones((10, 1), order="C").flags.f_contiguous
        print("NumPy relaxed strides checking option:", relaxed_strides)
        npdir = os.path.dirname(numpy.__file__)
        print("NumPy is installed in %s" % npdir)

        if 'scipy' in self.package_name:
            import scipy
            print("SciPy version %s" % scipy.__version__)
            spdir = os.path.dirname(scipy.__file__)
            print("SciPy is installed in %s" % spdir)

        pyversion = sys.version.replace('\n', '')
        print("Python version %s" % pyversion)
        print("nose version %d.%d.%d" % nose.__versioninfo__)