[UnitTest] Fix UnitTests - use utf-8
On some systems there is a problem with utf-8 during testing. This commit is trying to address it. Tested only on ubuntu 20.04 Signed-off-by: Przemo Firszt <przemo@firszt.eu>
This commit is contained in:
committed by
Bernd Hahnebach
parent
7b77ea52e7
commit
d008d44a34
@@ -125,9 +125,10 @@ class UnitBasicCases(unittest.TestCase):
|
||||
try:
|
||||
q2 = FreeCAD.Units.Quantity(t[0])
|
||||
if math.fabs(q1.Value - q2.Value) > 0.01:
|
||||
print (q1, " : ", q2, " : ", t, " : ", i, " : ", val)
|
||||
print (u" {} : {} : {} : {} : {}".format(q1,q2, t, i, val).encode("utf-8").strip())
|
||||
except Exception as e:
|
||||
print ("{}: {}".format(str(e), t[0]))
|
||||
s = "{}: {}".format(e, t[0])
|
||||
print (u" ".join(e).encode("utf-8").strip())
|
||||
|
||||
def testVoltage(self):
|
||||
q1 = FreeCAD.Units.Quantity("1e20 V")
|
||||
|
||||
Reference in New Issue
Block a user