Skip to content

Commit

Permalink
Revert "Integration tests for mark_faces"
Browse files Browse the repository at this point in the history
This reverts commit 2130ea8.
  • Loading branch information
hyades committed Aug 25, 2013
1 parent e106f2e commit 37a8db8
Showing 1 changed file with 2 additions and 57 deletions.
59 changes: 2 additions & 57 deletions python-api/tests/integrationtests/test_controller.py
Expand Up @@ -492,60 +492,5 @@ def test_click_video(self):
d = [
[0,0, 10, 10],
]
start = 6
for i in range(start, 7):
self.click_video(d[i-start][0], d[i-start][1], d[i-start][2], d[i-start][3], i, True)


class TestMarkFace(object):

NUM = 1

def mark_face(self, faces, index, generate_frames=False):

for i in range(self.NUM):
s = Server(path=PATH)
try:
s.run()
sources = TestSources(video_port=3000)
preview = PreviewSinks()
preview.run()
out_file = "output-{0}.data".format(index)
video_sink = VideoFileSink(PATH, 3001, out_file)
sources.new_test_video(pattern=4)
sources.new_test_video(pattern=5)
controller = Controller()
time.sleep(1)
res = controller.mark_face(faces)
print res
time.sleep(5)
sources.terminate_video()
preview.terminate()
video_sink.terminate()
s.terminate()
if not generate_frames:
assert res is not None
assert self.verify_output(index, out_file) == True


finally:
if s.proc:
s.terminate()

def verify_output(self, index, video):
test = 'mark_face_{0}'.format(index)
cmpr = CompareVideo(test, video)
res1, res2 = cmpr.compare()
print "RESULTS", res1, res2
# TODO Experimental Value
if res1 == 0 and res2 == 0:
return True
return False

def test_mark_face(self):
d = [
[(1, 1, 1, 1), (10, 10, 1, 1)],
]
start = 7
for i in range(start, 8):
self.mark_face(d[i-start], i, True)
for i in range(4,5):
self.click_video(d[i-4][0], d[i-4][1], d[i-4][2], d[i-4][3], i, True)

0 comments on commit 37a8db8

Please sign in to comment.