From 749a3e35a9938a67d09734ec3d303ce49f7ea35c Mon Sep 17 00:00:00 2001 From: hyades Date: Sat, 17 Aug 2013 01:27:15 +0530 Subject: [PATCH] fixed problems in comparing lists --- python-api/tests/integrationtests/test_controller.py | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/python-api/tests/integrationtests/test_controller.py b/python-api/tests/integrationtests/test_controller.py index b752cb3..ff422b6 100644 --- a/python-api/tests/integrationtests/test_controller.py +++ b/python-api/tests/integrationtests/test_controller.py @@ -47,8 +47,10 @@ def get_compose_port(self): def test_compose_ports(self): res = [] + expected_result = [] for i in range(self.NUM): video_port = (i+1)*1000 + expected_result.append([video_port+1]*self.NUM*3) s = Server(path=PATH, video_port=video_port) try: s.run() @@ -61,14 +63,14 @@ def test_compose_ports(self): finally: if s.proc: s.terminate() - expected_result = [[1001]*self.NUM*3, - [2001]*self.NUM*3, - [3001]*self.NUM*3, - [4001]*self.NUM*3] + at = [ tuple(i) for i in expected_result] bt = [ tuple(i) for i in res] assert set(at) == set(bt) + + +