Skip to content

Commit

Permalink
disable test if credentials not found
Browse files Browse the repository at this point in the history
  • Loading branch information
jbecla committed Feb 25, 2015
1 parent 4ffeed5 commit e5a2e96
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion tests/testDbLocal.py
@@ -1,7 +1,7 @@
#!/usr/bin/env python

# LSST Data Management System
# Copyright 2013-2014 LSST Corporation.
# Copyright 2013-2015 LSST Corporation.
#
# This product includes software developed by the
# LSST Project (http://www.lsst.org/).
Expand Down Expand Up @@ -49,6 +49,7 @@
import tempfile
import time
import unittest
import os.path

# local
from lsst.db.db import Db, DbException
Expand Down Expand Up @@ -476,6 +477,10 @@ def main():
datefmt='%m/%d/%Y %I:%M:%S',
level=logging.DEBUG)

if not os.path.isfile(TestDbLocal.CREDFILE):
logging.warning("Can't test, %s not found" % TestDbLocal.CREDFILE)
return

if TestDbLocal.CREDFILE.startswith('~'):
credFile = os.path.expanduser(TestDbLocal.CREDFILE)
if not os.path.isfile(credFile):
Expand Down

0 comments on commit e5a2e96

Please sign in to comment.