Skip to content

Commit

Permalink
Merge pull request NVIDIA#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 authored Nov 14, 2016
2 parents 588d2a8 + 0e18837 commit 7fbb9b4
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 7fbb9b4

Please sign in to comment.