Skip to content
This repository has been archived by the owner on Dec 13, 2024. It is now read-only.

Commit

Permalink
TST: Adapt test to recent changes
Browse files Browse the repository at this point in the history
  • Loading branch information
elcorto committed Feb 18, 2019
1 parent 1cafed3 commit 4d033a4
Showing 1 changed file with 4 additions and 5 deletions.
9 changes: 4 additions & 5 deletions imagecluster/tests/test_ic.py
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,6 @@
logging.getLogger("tensorflow").setLevel(logging.ERROR)

from imagecluster import main
from imagecluster import imagecluster as ic
pj = os.path.join


Expand All @@ -20,8 +19,8 @@ def test():
imagedir = tempfile.mkdtemp(prefix='imagecluster_')
dbfn = pj(imagedir, main.ic_base_dir, 'fingerprints.pk')
arr = misc.face()
images = [arr,
ni.gaussian_filter(arr, 10),
images = [arr,
ni.gaussian_filter(arr, 10),
ni.gaussian_filter(arr, 20),
arr[...,0], # fake gray-scale image
]
Expand All @@ -32,8 +31,8 @@ def test():
image_fns.append(fn)
# run 1: create fingerprints database, run clustering
main.main(imagedir)
# run 2: only run clustering, should be much faster
main.main(imagedir)
# run 2: only run clustering, should be much faster, this time use PCA
main.main(imagedir, pca=True)
with open(dbfn, 'rb') as fd:
fps = pickle.load(fd)
assert len(fps.keys()) == 4
Expand Down

0 comments on commit 4d033a4

Please sign in to comment.