blob: 3c23027c3bb7d8b7cc0ceb36b4df40d10ac9e6fc (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
|
import sys
import itertools
import pytest
blacklist = ["test_dtm.py", # Requires hnswlib
"test_knn.py", # Requires pykeops
"test_representations.py", # Look into this
"test_tomato.py", # Wants to use X.
"test_wasserstein_distance.py::test_wasserstein_distance_grad", # Requires PyTorch.
"test_wasserstein_with_tensors.py" # Requires PyTorch and TF.
]
print("Blacklist: %s" %(str(blacklist)))
testdir = sys.argv[1]
deselect_args = list(itertools.chain.from_iterable([["--deselect", "%s/%s" %(testdir, exclude)] for exclude in blacklist]))
exitcode = pytest.main([testdir] + deselect_args)
exit(exitcode)
|