strange behaviour when retrieving objects from bob.bio.base filelist database query
In the objects method of query.py (bob.bio.database.filelist), I encountered something really strange when performing nosetests. As far as I can tell, there is a problem when the method is called two times with the same groups and purposes arguments, but with a different protocol:
assert len(db.objects(protocol='public_MC_NIR', groups='dev', purposes='probe')) == 500 assert len(db.objects(protocol='public_UD_NIR', groups='dev', purposes='probe')) == 1000
Running this, I get a value of 500 for both tests ... which corresponds to the value expected in the first test. And if I just change the order of the lines, I get a value of 1000 for both tests.
So, my guess is that something is not re-initialized properly (but I was not able to find it yet) ...