CMS 3D CMS Logo

List of all members | Public Member Functions
cmsswRelease.CMSSWReleaseTest Class Reference
Inheritance diagram for cmsswRelease.CMSSWReleaseTest:

Public Member Functions

def test_cmsswRelease (self)
 
def test_isNewerThan (self)
 
def test_releaseNumber (self)
 

Detailed Description

Definition at line 62 of file cmsswRelease.py.

Member Function Documentation

◆ test_cmsswRelease()

def cmsswRelease.CMSSWReleaseTest.test_cmsswRelease (   self)

Definition at line 63 of file cmsswRelease.py.

63  def test_cmsswRelease(self):
64  rel = cmsswRelease()
65  self.assertTrue(rel.startswith('CMSSW_'))

◆ test_isNewerThan()

def cmsswRelease.CMSSWReleaseTest.test_isNewerThan (   self)

Definition at line 78 of file cmsswRelease.py.

References cmsswRelease.isNewerThan().

78  def test_isNewerThan(self):
79  self.assertTrue( isNewerThan('CMSSW_5_3_1','CMSSW_7_1_0') )
80  self.assertTrue( isNewerThan('CMSSW_5_3_1','CMSSW_5_3_1_patch1') )
81  self.assertTrue( isNewerThan('CMSSW_5_3_1','CMSSW_5_3_1_pre1') )
82  self.assertTrue( isNewerThan('CMSSW_5_3_1_pre1','CMSSW_5_3_1_pre2') )
83 
84 
85 
86  unittest.main()
def isNewerThan(release1, release2=None)
Definition: cmsswRelease.py:53

◆ test_releaseNumber()

def cmsswRelease.CMSSWReleaseTest.test_releaseNumber (   self)

Definition at line 66 of file cmsswRelease.py.

References cmsswRelease.releaseNumber().

66  def test_releaseNumber(self):
67  out = releaseNumber('CMSSW_7_2_1')
68  self.assertEqual(out, (7,2,1))
69  out = releaseNumber('CMSSW_10_2_1_patch4')
70  self.assertEqual(out, (10,2,1,4))
71  out = releaseNumber('CMSSW_7_3_X_2014-10-30-0200')
72  self.assertEqual(out, (7,3))
73  out = releaseNumber('CMSSW_7_3_0_pre2')
74  self.assertEqual(out, (7,3,0,2))
75  self.assertRaises(ValueError, releaseNumber, 'foobar')
76  self.assertRaises(ValueError, releaseNumber, 'CMSSW_1_2_3_xat3')
77  self.assertRaises(ValueError, releaseNumber, 'CMSSW_1_2_a')
def releaseNumber(release=None)
Definition: cmsswRelease.py:19