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 60 of file cmsswRelease.py.

Member Function Documentation

def cmsswRelease.CMSSWReleaseTest.test_cmsswRelease (   self)

Definition at line 61 of file cmsswRelease.py.

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

Definition at line 76 of file cmsswRelease.py.

References cmsswRelease.isNewerThan().

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

Definition at line 64 of file cmsswRelease.py.

References cmsswRelease.releaseNumber().

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