Skip to content

Commit 6d105a9

Browse files
authored
Merge pull request #109 from launchdarkly/eb/ch37610/fix-skip-db-tests
fix skipping of database tests
2 parents cbac044 + 52c3b23 commit 6d105a9

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

Diff for: testing/test_feature_store.py

+4-1
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,8 @@
1919
from ldclient.redis_feature_store import RedisFeatureStore
2020
from ldclient.versioned_data_kind import FEATURES
2121

22+
skip_db_tests = os.environ.get('LD_SKIP_DATABASE_TESTS') == '1'
23+
2224

2325
class InMemoryTester(object):
2426
def init_store(self):
@@ -166,7 +168,7 @@ def _clear_data(self):
166168

167169

168170
class TestFeatureStore:
169-
if os.environ.get('LD_SKIP_DATABASE_TESTS') == '1':
171+
if skip_db_tests:
170172
params = [
171173
InMemoryTester()
172174
]
@@ -321,6 +323,7 @@ def test_stores_with_different_prefixes_are_independent(self, tester):
321323
assert items == { 'flagB1': flag_b1, 'flagB2': flag_b2 }
322324

323325

326+
@pytest.mark.skipif(skip_db_tests, reason="skipping database tests")
324327
class TestRedisFeatureStoreExtraTests:
325328
def test_upsert_race_condition_against_external_client_with_higher_version(self):
326329
other_client = redis.StrictRedis(host='localhost', port=6379, db=0)

0 commit comments

Comments
 (0)