2019-05-28 16:17:22 +02:00
|
|
|
# Copyright (c) Facebook, Inc. and its affiliates.
|
2018-12-19 17:48:35 +01:00
|
|
|
#
|
2019-05-28 16:17:22 +02:00
|
|
|
# This source code is licensed under the MIT license found in the
|
2018-12-19 17:48:35 +01:00
|
|
|
# LICENSE file in the root directory of this source tree.
|
|
|
|
|
|
|
|
#! /usr/bin/env python2
|
|
|
|
|
|
|
|
import unittest
|
|
|
|
import faiss
|
|
|
|
|
|
|
|
|
|
|
|
class TestIVFlib(unittest.TestCase):
|
|
|
|
|
|
|
|
def test_methods_exported(self):
|
|
|
|
methods = ['check_compatible_for_merge', 'extract_index_ivf',
|
|
|
|
'merge_into', 'search_centroid',
|
|
|
|
'search_and_return_centroids', 'get_invlist_range',
|
|
|
|
'set_invlist_range', 'search_with_parameters']
|
|
|
|
|
|
|
|
for method in methods:
|
|
|
|
assert callable(getattr(faiss, method, None))
|