From 66954ff40760fc27d092eb5234dfa8b28177438c Mon Sep 17 00:00:00 2001 From: Amir MOHAMMADI <amir.mohammadi@idiap.ch> Date: Tue, 10 Mar 2020 16:54:31 +0100 Subject: [PATCH] Remove usage of numpy.testing.decorators Fixes #132 --- bob/bio/base/database/database.py | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/bob/bio/base/database/database.py b/bob/bio/base/database/database.py index 72c0af89..80f321c3 100644 --- a/bob/bio/base/database/database.py +++ b/bob/bio/base/database/database.py @@ -4,8 +4,6 @@ import os import abc import six -# Nose is detecting a function as a test function, while it is not... -from numpy.testing.decorators import setastest import bob.db.base @@ -64,6 +62,10 @@ class BioDatabase(six.with_metaclass(abc.ABCMeta, bob.db.base.FileDatabase)): The arguments of the `Database` base class constructor. """ + + # tell test runners (such as nose and pytest) that this class is not a test class + ___test___ = False + def __init__( self, name, @@ -302,7 +304,7 @@ class BioDatabase(six.with_metaclass(abc.ABCMeta, bob.db.base.FileDatabase)): protocol: str The protocol for which the groups should be retrieved. - If you do not have protocols defined, just ignore this field. + If you do not have protocols defined, just ignore this field. """ raise NotImplementedError("This function must be implemented in your derived class.") @@ -436,7 +438,6 @@ class BioDatabase(six.with_metaclass(abc.ABCMeta, bob.db.base.FileDatabase)): else: return files - @setastest(False) def test_files(self, groups=['dev']): """test_files(groups = ['dev']) -> files -- GitLab