tests: Use the Python SkipTest if possible
This makes nosetests optional at least in theory. Recent nose versions already do the same thing internally.
This commit is contained in:
parent
6429662e55
commit
0283597283
7 changed files with 18 additions and 16 deletions
|
|
@ -17,10 +17,10 @@
|
||||||
# You should have received a copy of the GNU Affero General Public License
|
# You should have received a copy of the GNU Affero General Public License
|
||||||
# along with weboob. If not, see <http://www.gnu.org/licenses/>.
|
# along with weboob. If not, see <http://www.gnu.org/licenses/>.
|
||||||
|
|
||||||
from nose.plugins.skip import SkipTest
|
|
||||||
from weboob.tools.test import BackendTest
|
|
||||||
from datetime import datetime
|
from datetime import datetime
|
||||||
|
|
||||||
|
from weboob.tools.test import BackendTest, SkipTest
|
||||||
|
|
||||||
|
|
||||||
class BiplanTest(BackendTest):
|
class BiplanTest(BackendTest):
|
||||||
BACKEND = 'biplan'
|
BACKEND = 'biplan'
|
||||||
|
|
|
||||||
|
|
@ -17,8 +17,7 @@
|
||||||
# You should have received a copy of the GNU Affero General Public License
|
# You should have received a copy of the GNU Affero General Public License
|
||||||
# along with weboob. If not, see <http://www.gnu.org/licenses/>.
|
# along with weboob. If not, see <http://www.gnu.org/licenses/>.
|
||||||
|
|
||||||
from nose.plugins.skip import SkipTest
|
from weboob.tools.test import BackendTest, SkipTest
|
||||||
from weboob.tools.test import BackendTest
|
|
||||||
|
|
||||||
|
|
||||||
class FeedlyTest(BackendTest):
|
class FeedlyTest(BackendTest):
|
||||||
|
|
|
||||||
|
|
@ -17,9 +17,8 @@
|
||||||
# You should have received a copy of the GNU Affero General Public License
|
# You should have received a copy of the GNU Affero General Public License
|
||||||
# along with weboob. If not, see <http://www.gnu.org/licenses/>.
|
# along with weboob. If not, see <http://www.gnu.org/licenses/>.
|
||||||
|
|
||||||
from nose.plugins.skip import SkipTest
|
|
||||||
from weboob.tools.test import BackendTest
|
|
||||||
from weboob.capabilities.audio import BaseAudio
|
from weboob.capabilities.audio import BaseAudio
|
||||||
|
from weboob.tools.test import BackendTest, SkipTest
|
||||||
|
|
||||||
|
|
||||||
class GroovesharkTest(BackendTest):
|
class GroovesharkTest(BackendTest):
|
||||||
|
|
|
||||||
|
|
@ -17,10 +17,10 @@
|
||||||
# You should have received a copy of the GNU Affero General Public License
|
# You should have received a copy of the GNU Affero General Public License
|
||||||
# along with weboob. If not, see <http://www.gnu.org/licenses/>.
|
# along with weboob. If not, see <http://www.gnu.org/licenses/>.
|
||||||
|
|
||||||
from nose.plugins.skip import SkipTest
|
|
||||||
from weboob.tools.test import BackendTest
|
|
||||||
from datetime import datetime
|
from datetime import datetime
|
||||||
|
|
||||||
|
from weboob.tools.test import BackendTest, SkipTest
|
||||||
|
|
||||||
|
|
||||||
class HybrideTest(BackendTest):
|
class HybrideTest(BackendTest):
|
||||||
BACKEND = 'hybride'
|
BACKEND = 'hybride'
|
||||||
|
|
|
||||||
|
|
@ -17,11 +17,9 @@
|
||||||
# You should have received a copy of the GNU Affero General Public License
|
# You should have received a copy of the GNU Affero General Public License
|
||||||
# along with weboob. If not, see <http://www.gnu.org/licenses/>.
|
# along with weboob. If not, see <http://www.gnu.org/licenses/>.
|
||||||
|
|
||||||
from nose.plugins.skip import SkipTest
|
|
||||||
|
|
||||||
from weboob.capabilities.base import NotLoaded
|
from weboob.capabilities.base import NotLoaded
|
||||||
from weboob.capabilities.paste import PasteNotFound
|
from weboob.capabilities.paste import PasteNotFound
|
||||||
from weboob.tools.test import BackendTest
|
from weboob.tools.test import BackendTest, SkipTest
|
||||||
|
|
||||||
from .browser import LimitExceeded
|
from .browser import LimitExceeded
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -18,9 +18,9 @@
|
||||||
# along with weboob. If not, see <http://www.gnu.org/licenses/>.
|
# along with weboob. If not, see <http://www.gnu.org/licenses/>.
|
||||||
|
|
||||||
import itertools
|
import itertools
|
||||||
from nose.plugins.skip import SkipTest
|
|
||||||
from weboob.tools.test import BackendTest
|
|
||||||
from weboob.capabilities.base import BaseObject
|
from weboob.capabilities.base import BaseObject
|
||||||
|
from weboob.tools.test import BackendTest, SkipTest
|
||||||
|
|
||||||
|
|
||||||
class TwitterTest(BackendTest):
|
class TwitterTest(BackendTest):
|
||||||
|
|
|
||||||
|
|
@ -17,14 +17,20 @@
|
||||||
# You should have received a copy of the GNU Affero General Public License
|
# You should have received a copy of the GNU Affero General Public License
|
||||||
# along with weboob. If not, see <http://www.gnu.org/licenses/>.
|
# along with weboob. If not, see <http://www.gnu.org/licenses/>.
|
||||||
|
|
||||||
from unittest import TestCase
|
|
||||||
from random import choice
|
from random import choice
|
||||||
|
from unittest import TestCase
|
||||||
|
|
||||||
from nose.plugins.skip import SkipTest
|
|
||||||
from weboob.core import Weboob
|
from weboob.core import Weboob
|
||||||
|
|
||||||
|
# This is what nose does for Python 2.6 and lower compatibility
|
||||||
|
# We do the same so nose becomes optional
|
||||||
|
try:
|
||||||
|
from unittest.case import SkipTest
|
||||||
|
except:
|
||||||
|
from nose.plugins.skip import SkipTest
|
||||||
|
|
||||||
__all__ = ['BackendTest']
|
|
||||||
|
__all__ = ['BackendTest', 'SkipTest']
|
||||||
|
|
||||||
|
|
||||||
class BackendTest(TestCase):
|
class BackendTest(TestCase):
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue