Disable contrib tests for python2. (#1364)

Summary: Pull Request resolved: https://github.com/facebookresearch/faiss/pull/1364

Test Plan: Imported from OSS

Reviewed By: mdouze

Differential Revision: D23314732

Pulled By: beauby

fbshipit-source-id: 788465c353bbc65947a6c766e8509f35f35e4134
pull/1380/head
Lucas Hosseini 2020-08-25 16:56:01 -07:00 committed by Facebook GitHub Bot
parent c689bd010c
commit e5d2defaae
1 changed files with 7 additions and 1 deletions

View File

@ -1,10 +1,16 @@
import faiss
import unittest
import numpy as np
import platform
from common import get_dataset_2
from faiss.contrib.exhaustive_search import knn_ground_truth
try:
from faiss.contrib.exhaustive_search import knn_ground_truth
except:
pass # Submodule import broken in python 2.
@unittest.skipIf(platform.python_version_tuple()[0] < '3', \
'Submodule import broken in python 2.')
class TestComputeGT(unittest.TestCase):
def test_compute_GT(self):