forked from aws/serverless-application-model
-
Notifications
You must be signed in to change notification settings - Fork 0
/
tox.ini
26 lines (23 loc) · 1.28 KB
/
tox.ini
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
# tox (https://tox.readthedocs.io/) is a tool for running tests
# in multiple virtualenvs. This configuration file will run the
# test suite on all supported python versions. To use it, "pip install tox"
# and then run "tox" from this directory.
[tox]
envlist = py27, py36
[testenv:py27]
# Set this environment variable **only** for Python2.7. In Py >= 3.3, the hash seed property was set to a random
# value on every execution. This is the seed for random number generator used to compute hash of objects. This hash
# is widely used in ``dict`` to compute insertion position. In Py2.7, this seed is uninitialized so when iterating
# over a dictionary, you tend to get the same order always. Unfortunately, this consistency is because the seed remains
# same and not a ordering guarantee provided by the dictionary.
#
# SAM Translator has a dependency on this pseudo-ordering to generate a stable LogicalID for API Gateway Deployment
# resource. Tox tries to simulate Py3 behavior in Py2.7 by setting PYTHONHASHSEED to random values on every run.
# This results in unit test failures. This happens only within Tox. To fix this, we are unsetting the seed value
# specifically for Py27 in Tox.
passenv = AWS*
setenv = PYTHONHASHSEED = 0
[testenv]
passenv = AWS*
whitelist_externals = make
commands = make pr