Skip to content

Commit

Permalink
Rename 'get_environ' -> 'check_environ'.
Browse files Browse the repository at this point in the history
Only caller ignored return value, so drop it.
  • Loading branch information
tseaver committed Apr 29, 2015
1 parent d21bc3f commit 3cbfe2f
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 8 deletions.
7 changes: 1 addition & 6 deletions regression/regression_utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@
"""


def get_environ(require_datastore=False, require_storage=False):
def check_environ(require_datastore=False, require_storage=False):
if require_datastore:
if DATASET_ID is None or not os.path.isfile(CREDENTIALS):
print(ENVIRON_ERROR_MSG, file=sys.stderr)
Expand All @@ -38,8 +38,3 @@ def get_environ(require_datastore=False, require_storage=False):
if PROJECT_ID is None or not os.path.isfile(CREDENTIALS):
print(ENVIRON_ERROR_MSG, file=sys.stderr)
sys.exit(1)

return {
'project_id': PROJECT_ID,
'dataset_id': DATASET_ID,
}
4 changes: 2 additions & 2 deletions regression/run_regression.py
Original file line number Diff line number Diff line change
Expand Up @@ -42,9 +42,9 @@ def main():
args = parser.parse_args()
# Make sure environ is set before running test.
if args.package == 'datastore':
regression_utils.get_environ(require_datastore=True)
regression_utils.check_environ(require_datastore=True)
elif args.package == 'storage':
regression_utils.get_environ(require_storage=True)
regression_utils.check_environ(require_storage=True)
test_result = run_module_tests(args.package)
if not test_result.wasSuccessful():
sys.exit(1)
Expand Down

0 comments on commit 3cbfe2f

Please sign in to comment.