From 9e82ec921f02a214f8341451c1e748553a163b50 Mon Sep 17 00:00:00 2001 From: Laurent El Shafey Date: Mon, 2 Dec 2013 11:49:42 +0100 Subject: [PATCH] Fix groups(), add test, update version --- setup.py | 2 +- xbob/db/arface/query.py | 2 +- xbob/db/arface/test.py | 1 + 3 files changed, 3 insertions(+), 2 deletions(-) diff --git a/setup.py b/setup.py index 6e25e30..b23d367 100644 --- a/setup.py +++ b/setup.py @@ -24,7 +24,7 @@ setup( name='xbob.db.arface', - version='1.2.1a0', + version='1.2.1', description='AR Face Database Access API for Bob', url='https://pypi.python.org/pypi/xbob.db.arface', license='GPLv3', diff --git a/xbob/db/arface/query.py b/xbob/db/arface/query.py index d658952..75fc484 100644 --- a/xbob/db/arface/query.py +++ b/xbob/db/arface/query.py @@ -53,7 +53,7 @@ def __init__(self, original_directory = None, original_extension = '.ppm'): def groups(self, protocol=None): """Returns the names of all registered groups""" - return ProtocolPurpose.group_choices + return self.m_groups def clients(self, groups=None, genders=None, protocol=None): """Returns a list of Client objects for the specific query by the user. diff --git a/xbob/db/arface/test.py b/xbob/db/arface/test.py index da80cde..5ecb641 100644 --- a/xbob/db/arface/test.py +++ b/xbob/db/arface/test.py @@ -30,6 +30,7 @@ def test01_clients(self): db = xbob.db.arface.Database() # test that the expected number of clients is returned + self.assertEqual(len(db.groups()), 3) self.assertEqual(len(db.client_ids()), 136) self.assertEqual(len(db.client_ids(genders='m')), 76) self.assertEqual(len(db.client_ids(genders='w')), 60)