-
Notifications
You must be signed in to change notification settings - Fork 165
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Update setup dependencies and remove pinnings (#712)
* setup: update dependencies and remove pinnings * setup: add "testing" extras label to help with local testing It's much easier to install test dependencies locally by doing `pip install -e .[testing]` instead of having to manually copy and paste the list from setup.py.
- Loading branch information
1 parent
3f97c9f
commit c436eea
Showing
3 changed files
with
40 additions
and
10 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,34 @@ | ||
from __future__ import absolute_import, division, print_function | ||
|
||
import logging | ||
import os | ||
|
||
|
||
logger = logging.getLogger(__name__) | ||
_saved_env = {} | ||
|
||
|
||
def setUpModule(): | ||
# Handle change in https://github.com/spulec/moto/issues/1924 | ||
# Ensure AWS SDK find some (bogus) credentials in the environment and | ||
# doesn't try to use other providers | ||
overrides = { | ||
'AWS_ACCESS_KEY_ID': 'testing', | ||
'AWS_SECRET_ACCESS_KEY': 'testing', | ||
'AWS_DEFAULT_REGION': 'us-east-1' | ||
} | ||
for key, value in overrides.items(): | ||
logger.info('Overriding env var: {}={}'.format(key, value)) | ||
_saved_env[key] = os.environ.get(key, None) | ||
os.environ[key] = value | ||
|
||
|
||
def tearDownModule(): | ||
for key, value in _saved_env.items(): | ||
logger.info('Restoring saved env var: {}={}'.format(key, value)) | ||
if value is None: | ||
del os.environ[key] | ||
else: | ||
os.environ[key] = value | ||
|
||
_saved_env.clear() |