mirror of
https://github.com/facebookresearch/faiss.git
synced 2026-10-12 02:13:36 +00:00
fix test syntax (#260)
This commit is contained in:
committed by
Matthijs Douze
parent
250a3d3f18
commit
de8ac33f2e
@@ -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???'
|
||||
|
||||
Reference in New Issue
Block a user