Skip to content

Commit

Permalink
added skip check to NOT run unit tests if certain environment variabl…
Browse files Browse the repository at this point in the history
…es are set denoting integration tests should be run
  • Loading branch information
coleslaw481 committed Sep 9, 2019
1 parent f8747f9 commit 0c175b6
Show file tree
Hide file tree
Showing 3 changed files with 12 additions and 0 deletions.
4 changes: 4 additions & 0 deletions tests/test_defaultnetworkxfactory.py
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,11 @@
from ndex2.nice_cx_network import DefaultNetworkXFactory
from ndex2.nice_cx_network import NiceCXNetwork

SKIP_REASON = 'NDEX2_TEST_USER environment variable detected, ' \
'skipping for integration tests'


@unittest.skipIf(os.getenv('NDEX2_TEST_SERVER') is not None, SKIP_REASON)
class TestDefaultNetworkXFactory(unittest.TestCase):

TEST_DIR = os.path.dirname(__file__)
Expand Down
4 changes: 4 additions & 0 deletions tests/test_legacynetworkxversiontwoplusfactory.py
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,11 @@
from ndex2.nice_cx_network import LegacyNetworkXVersionTwoPlusFactory
from ndex2.nice_cx_network import NiceCXNetwork

SKIP_REASON = 'NDEX2_TEST_USER environment variable detected, ' \
'skipping for integration tests'


@unittest.skipIf(os.getenv('NDEX2_TEST_SERVER') is not None, SKIP_REASON)
class TestLegacyNetworkXVersionTwoPlusFactory(unittest.TestCase):

TEST_DIR = os.path.dirname(__file__)
Expand Down
4 changes: 4 additions & 0 deletions tests/test_nice_cx_network.py
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,11 @@
import ndex2


SKIP_REASON = 'NDEX2_TEST_USER environment variable detected, ' \
'skipping for integration tests'


@unittest.skipIf(os.getenv('NDEX2_TEST_SERVER') is not None, SKIP_REASON)
class TestNiceCXNetwork(unittest.TestCase):

TEST_DIR = os.path.dirname(__file__)
Expand Down

0 comments on commit 0c175b6

Please sign in to comment.