test
CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Pages
List of all members | Public Member Functions
cmsswRelease.CMSSWReleaseTest Class Reference
Inheritance diagram for cmsswRelease.CMSSWReleaseTest:

Public Member Functions

def test_cmsswRelease
 
def test_isNewerThan
 
def test_releaseNumber
 

Detailed Description

Definition at line 62 of file cmsswRelease.py.

Member Function Documentation

def cmsswRelease.CMSSWReleaseTest.test_cmsswRelease (   self)

Definition at line 63 of file cmsswRelease.py.

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

Definition at line 78 of file cmsswRelease.py.

References cmsswRelease.isNewerThan().

78 
79  def test_isNewerThan(self):
80  self.assertTrue( isNewerThan('CMSSW_5_3_1','CMSSW_7_1_0') )
81  self.assertTrue( isNewerThan('CMSSW_5_3_1','CMSSW_5_3_1_patch1') )
82  self.assertTrue( isNewerThan('CMSSW_5_3_1','CMSSW_5_3_1_pre1') )
83  self.assertTrue( isNewerThan('CMSSW_5_3_1_pre1','CMSSW_5_3_1_pre2') )
84 
85 
86 
unittest.main()
def cmsswRelease.CMSSWReleaseTest.test_releaseNumber (   self)

Definition at line 66 of file cmsswRelease.py.

References cmsswRelease.releaseNumber().

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