Skip to content

Commit

Permalink
Merge pull request #1263 from lukeyeager/tests-without-plugins
Browse files Browse the repository at this point in the history
[Tests] Skip if extension not installed
  • Loading branch information
lukeyeager committed Nov 14, 2016
2 parents ade0287 + 0812313 commit 7e4afa9
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions digits/dataset/generic/test_views.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@
import json
import os
import tempfile
import unittest

from bs4 import BeautifulSoup
import numpy as np
Expand Down Expand Up @@ -179,6 +180,8 @@ def create_variable_size_random_imageset(cls, **kwargs):

@classmethod
def setUpClass(cls, **kwargs):
if extensions.data.get_extension(cls.EXTENSION_ID) is None:
raise unittest.SkipTest('Extension "%s" is not installed' % cls.EXTENSION_ID)
super(BaseViewsTestWithDataset, cls).setUpClass()
cls.dataset_id = cls.create_dataset(json=True, **kwargs)
assert cls.dataset_wait_completion(cls.dataset_id) == 'Done', 'create failed'
Expand Down

0 comments on commit 7e4afa9

Please sign in to comment.