當前位置: 首頁>>代碼示例>>Python>>正文


Python nose.__versioninfo__方法代碼示例

本文整理匯總了Python中nose.__versioninfo__方法的典型用法代碼示例。如果您正苦於以下問題:Python nose.__versioninfo__方法的具體用法?Python nose.__versioninfo__怎麽用?Python nose.__versioninfo__使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在nose的用法示例。


在下文中一共展示了nose.__versioninfo__方法的6個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的Python代碼示例。

示例1: import_nose

# 需要導入模塊: import nose [as 別名]
# 或者: from nose import __versioninfo__ [as 別名]
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 '
               'https://nose.readthedocs.io' %
               minimum_nose_version)
        raise ImportError(msg)

    return nose 
開發者ID:Frank-qlu,項目名稱:recruit,代碼行數:22,代碼來源:utils.py

示例2: import_nose

# 需要導入模塊: import nose [as 別名]
# 或者: from nose import __versioninfo__ [as 別名]
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 
開發者ID:ryfeus,項目名稱:lambda-packs,代碼行數:22,代碼來源:utils.py

示例3: import_nose

# 需要導入模塊: import nose [as 別名]
# 或者: from nose import __versioninfo__ [as 別名]
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 
開發者ID:abhisuri97,項目名稱:auto-alt-text-lambda-api,代碼行數:22,代碼來源:nosetester.py

示例4: _show_system_info

# 需要導入模塊: import nose [as 別名]
# 或者: from nose import __versioninfo__ [as 別名]
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__) 
開發者ID:abhisuri97,項目名稱:auto-alt-text-lambda-api,代碼行數:21,代碼來源:nosetester.py

示例5: import_nose

# 需要導入模塊: import nose [as 別名]
# 或者: from nose import __versioninfo__ [as 別名]
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 
開發者ID:ktraunmueller,項目名稱:Computable,代碼行數:23,代碼來源:nosetester.py

示例6: _show_system_info

# 需要導入模塊: import nose [as 別名]
# 或者: from nose import __versioninfo__ [as 別名]
def _show_system_info(self):
        nose = import_nose()

        import numpy
        print("NumPy version %s" % numpy.__version__)
        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__) 
開發者ID:ktraunmueller,項目名稱:Computable,代碼行數:19,代碼來源:nosetester.py


注:本文中的nose.__versioninfo__方法示例由純淨天空整理自Github/MSDocs等開源代碼及文檔管理平台,相關代碼片段篩選自各路編程大神貢獻的開源項目,源碼版權歸原作者所有,傳播和使用請參考對應項目的License;未經允許,請勿轉載。