예제 #1
0
 def test_gitBranch(self):
     branch = PetscVersion.gitBranch()
     if PetscVersion.isRelease():
         self.assertEqual("unknown", branch)
     else:
         self.failIf(len(branch) == 0)
     return
예제 #2
0
 def test_gitBranch(self):
     branch = PetscVersion.gitBranch()
     if PetscVersion.isRelease():
         pass
     else:
         self.assertFalse(len(branch) == 0)
     return
예제 #3
0
 def test_gitBranch(self):
   branch = PetscVersion.gitBranch()
   if PetscVersion.isRelease():
     self.assertEqual("unknown", branch)
   else:
     self.failIf(len(branch) == 0)
   return
예제 #4
0
 def test_gitVersion(self):
   revision = PetscVersion.gitRevision()
   if PetscVersion.isRelease():
     self.assertEqual("unknown", revision)
   else:
     # Check that revision is of the form v2.1.3-16-g9323114 or v3.10-88-g06a760874e
     import re
     match = re.search("v[0-9]+\.[0-9]+(\.[0-9]+)*-[0-9]+-g[0-9,a-z]+", revision)
     self.failIf(match is None)
   return
예제 #5
0
 def test_gitVersion(self):
   revision = PetscVersion.gitRevision()
   if PetscVersion.isRelease():
     self.assertEqual("unknown", revision)
   else:
     # Check that revision is of the form v2.1.3-16-g9323114
     import re
     match = re.search("v[0-9]+\.[0-9]+\.[0-9]+-[0-9]+-g[0-9,a-z]+", revision)
     self.failIf(match is None)
   return
예제 #6
0
 def test_gitDate(self):
     value = PetscVersion.gitDate()
     if PetscVersion.isRelease():
         pass
     else:
         # Check form of datetime
         import datetime
         fields = value.split()
         d = datetime.datetime.strptime(fields[0], "%Y-%m-%d")
         t = datetime.datetime.strptime(fields[1], "%H:%M:%S")
     return
예제 #7
0
 def test_gitDate(self):
   value = PetscVersion.gitDate()
   if PetscVersion.isRelease():
     self.assertEqual("unknown", value)
   else:
     # Check form of datetime
     import datetime
     fields = value.split()
     d = datetime.datetime.strptime(fields[0], "%Y-%m-%d")
     t = datetime.datetime.strptime(fields[1], "%H:%M:%S")
   return
예제 #8
0
 def test_isRelease(self):
     isRelease = PetscVersion.isRelease()
     return
예제 #9
0
 def test_isRelease(self):
   isRelease = PetscVersion.isRelease()
   return