fix test syntax (#260)

This commit is contained in:
Soumith Chintala
2017-11-23 10:40:06 +01:00
committed by Matthijs Douze
parent 250a3d3f18
commit de8ac33f2e
+2 -2
View File
@@ -132,7 +132,7 @@ class TestException(unittest.TestCase):
try:
# an unsupported operation for IndexFlat
index.add_with_ids(a, b)
except RuntimeError, e:
except RuntimeError as e:
assert 'add_with_ids not implemented' in str(e)
else:
assert False, 'exception did not fire???'
@@ -141,7 +141,7 @@ class TestException(unittest.TestCase):
try:
faiss.index_factory(12, 'IVF256,Flat,PQ8')
except RuntimeError, e:
except RuntimeError as e:
assert 'could not parse' in str(e)
else:
assert False, 'exception did not fire???'