Migrated % string formating

This commit is contained in:
Cody
2016-07-21 12:08:19 -07:00
committed by Lindsey Heagy
parent 8093288391
commit 45f5906554
47 changed files with 190 additions and 190 deletions
+5 -5
View File
@@ -28,14 +28,14 @@ class RegularizationTests(unittest.TestCase):
for i, mesh in enumerate(self.meshlist):
print 'Testing %iD'%mesh.dim
print 'Testing {0:d}D'.format(mesh.dim)
mapping = r.mapPair(mesh)
reg = r(mesh, mapping=mapping)
m = np.random.rand(mapping.nP)
reg.mref = np.ones_like(m)*np.mean(m)
print 'Check: phi_m (mref) = %f' %reg.eval(reg.mref)
print 'Check: phi_m (mref) = {0:f}'.format(reg.eval(reg.mref))
passed = reg.eval(reg.mref) < TOL
self.assertTrue(passed)
@@ -56,7 +56,7 @@ class RegularizationTests(unittest.TestCase):
for i, mesh in enumerate(self.meshlist):
print 'Testing Active Cells %iD'%(mesh.dim)
print 'Testing Active Cells {0:d}D'.format((mesh.dim))
if mesh.dim == 1:
indActive = Utils.mkvc(mesh.gridCC <= 0.8)
@@ -70,7 +70,7 @@ class RegularizationTests(unittest.TestCase):
m = np.random.rand(mesh.nC)[indAct]
reg.mref = np.ones_like(m)*np.mean(m)
print 'Check: phi_m (mref) = %f' %reg.eval(reg.mref)
print 'Check: phi_m (mref) = {0:f}'.format(reg.eval(reg.mref))
passed = reg.eval(reg.mref) < TOL
self.assertTrue(passed)
@@ -87,7 +87,7 @@ class RegularizationTests(unittest.TestCase):
for i, mesh in enumerate(self.meshlist):
print 'Testing %iD'%mesh.dim
print 'Testing {0:d}D'.format(mesh.dim)
# mapping = r.mapPair(mesh)
# reg = r(mesh, mapping=mapping)