robustify the #577 tests

This commit is contained in:
Greg Landrum
2015-08-24 20:38:04 +02:00
parent d688b53ae4
commit ceb9953e6a

View File

@@ -117,7 +117,11 @@ class TestCase(unittest.TestCase):
""" tests handling of Github issue 577 """
m1 = Chem.MolFromSmiles('CCO')
from locale import setlocale, LC_NUMERIC
setlocale(LC_NUMERIC, "de_DE")
try:
setlocale(LC_NUMERIC, "de_DE")
except:
# can't set the required locale, might as well just return
return
rdPartialCharges.ComputeGasteigerCharges(m1)
for at in m1.GetAtoms():
float(at.GetProp('_GasteigerCharge'))