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


Python Version.getMinor方法代碼示例

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


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

示例1: QueryTestCaseNoAddendum

# 需要導入模塊: from version import Version [as 別名]
# 或者: from version.Version import getMinor [as 別名]
class QueryTestCaseNoAddendum( unittest.TestCase ):
    def setUp( self ):
        self.base = Version( '3.5.2' )
        
    def testGetMajor( self ):
        assertEquals( 'Major version number' ,
                      self.base.getMajor(),
                      3 )
      
    def testGetMinor( self ):
        assertEquals( 'Minor version number' ,
                      self.base.getMinor(),
                      5 )
                      
    def testGetPatch( self ):
        assertEquals( 'Patch level' ,
                      self.base.getPatch(),
                      2 )
              
    def testGetAddendum( self ):
        assertEquals( 'Addendum' ,
                      self.base.getAddendum(),
                      None )
                      
    def testPrintVersion( self ):
        verString = "%s" % self.base
        assertEquals( 'Version string' ,
                      verString,
                      '3.5.2' )

    def testGetVersionNoAddendum( self ):
        verString = self.base.getVersionNoAddendum()
        assertEquals( 'Version string - no add' ,
                      verString,
                      '3.5.2' )
開發者ID:muromec,項目名稱:qtopia-ezx,代碼行數:37,代碼來源:test_version.py

示例2: MixedVersionNumber

# 需要導入模塊: from version import Version [as 別名]
# 或者: from version.Version import getMinor [as 別名]
class MixedVersionNumber( unittest.TestCase ):
    def setUp( self ):
        self.base = Version( '2.4.4c1' )
        
    def testGetMajor( self ):
        assertEquals( 'Major version number' ,
                      self.base.getMajor(),
                      2 )
      
    def testGetMinor( self ):
        assertEquals( 'Minor version number' ,
                      self.base.getMinor(),
                      4 )
                      
    def testGetPatch( self ):
        assertEquals( 'Patch level' ,
                      self.base.getPatch(),
                      4 )
              
    def testGetAddendum( self ):
        assertEquals( 'Addendum' ,
                      self.base.getAddendum(),
                      'c1' )
                      
    def testPrintVersion( self ):
        verString = "%s" % self.base
        assertEquals( 'Version string' ,
                      verString,
                      '2.4.4-c1' )
                      
    def testGetVersionNoAddendum( self ):
        verString = self.base.getVersionNoAddendum()
        assertEquals( 'Version string - no add' ,
                      verString,
                      '2.4.4' )
開發者ID:muromec,項目名稱:qtopia-ezx,代碼行數:37,代碼來源:test_version.py

示例3: TwoDashAdd

# 需要導入模塊: from version import Version [as 別名]
# 或者: from version.Version import getMinor [as 別名]
class TwoDashAdd( unittest.TestCase ):
    def setUp( self ):
        self.base = Version( '3.2.1-devel-test-twodash' )
        
    def testGetMajor( self ):
        assertEquals( 'Major version number' ,
                      self.base.getMajor(),
                      3 )
      
    def testGetMinor( self ):
        assertEquals( 'Minor version number' ,
                      self.base.getMinor(),
                      2 )
                      
    def testGetPatch( self ):
        assertEquals( 'Patch level' ,
                      self.base.getPatch(),
                      1 )
              
    def testGetAddendum( self ):
        assertEquals( 'Addendum' ,
                      self.base.getAddendum(),
                      'devel-test-twodash' )
                      
    def testPrintVersion( self ):
        verString = "%s" % self.base
        assertEquals( 'Version string' ,
                      verString,
                      '3.2.1-devel-test-twodash' )
                      
    def testGetVersionNoAddendum( self ):
        verString = self.base.getVersionNoAddendum()
        assertEquals( 'Version string - no add' ,
                      verString,
                      '3.2.1' )
開發者ID:muromec,項目名稱:qtopia-ezx,代碼行數:37,代碼來源:test_version.py

示例4: TwoDigit

# 需要導入模塊: from version import Version [as 別名]
# 或者: from version.Version import getMinor [as 別名]
class TwoDigit( unittest.TestCase ):
    def setUp( self ):
        self.base = Version( '6.4-foob' )
        
    def testGetMajor( self ):
        assertEquals( 'Major version number' ,
                      self.base.getMajor(),
                      6 )
      
    def testGetMinor( self ):
        assertEquals( 'Minor version number' ,
                      self.base.getMinor(),
                      4 )
                      
    def testGetPatch( self ):
        assertEquals( 'Patch level' ,
                      self.base.getPatch(),
                      0 )
              
    def testGetAddendum( self ):
        assertEquals( 'Addendum' ,
                      self.base.getAddendum(),
                      'foob' )
                      
    def testPrintVersion( self ):
        verString = "%s" % self.base
        assertEquals( 'Version string' ,
                      verString,
                      '6.4-foob' )
                      
    def testGetVersionNoAddendum( self ):
        verString = self.base.getVersionNoAddendum()
        assertEquals( 'Version string - no add' ,
                      verString,
                      '6.4' )
開發者ID:muromec,項目名稱:qtopia-ezx,代碼行數:37,代碼來源:test_version.py

示例5: FirstDigitZero

# 需要導入模塊: from version import Version [as 別名]
# 或者: from version.Version import getMinor [as 別名]
class FirstDigitZero( unittest.TestCase ):
    def setUp( self ):
        self.base = Version( '0.0.1' )
        
    def testGetMajor( self ):
        assertEquals( 'Major version number' ,
                      self.base.getMajor(),
                      0 )
      
    def testGetMinor( self ):
        assertEquals( 'Minor version number' ,
                      self.base.getMinor(),
                      0 )
                      
    def testGetPatch( self ):
        assertEquals( 'Patch level' ,
                      self.base.getPatch(),
                      1 )
              
    def testGetAddendum( self ):
        assertEquals( 'Addendum' ,
                      self.base.getAddendum(),
                      None )
                      
    def testPrintVersion( self ):
        verString = "%s" % self.base
        assertEquals( 'Version string' ,
                      verString,
                      '0.0.1' )
                      
    def testGetVersionNoAddendum( self ):
        verString = self.base.getVersionNoAddendum()
        assertEquals( 'Version string - no add' ,
                      verString,
                      '0.0.1' )
開發者ID:muromec,項目名稱:qtopia-ezx,代碼行數:37,代碼來源:test_version.py


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