Skip to content

Commit

Permalink
Allow pythonhashseed to be random
Browse files Browse the repository at this point in the history
We may miss some bugs due to non-random pythonhashseed

So we need either ensure that we test in an environment where this
seed can be random or require from operator to provide PYTHONHASHSEED=0
to solar process, for example send it to docker container
  • Loading branch information
dshulyak committed Nov 30, 2015
1 parent fead38d commit 4c37224
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 8 deletions.
11 changes: 4 additions & 7 deletions solar/dblayer/test/test_real.py
Original file line number Diff line number Diff line change
Expand Up @@ -374,13 +374,10 @@ def test_simple_to_listdict_inputs(rk):
r4.save()

inputs = set(pytest.dicts_to_hashable(r2.inputs['input']))
expected_inputs = set(pytest.dicts_to_hashable([
{u'input2': 1115,
u'input1': 110},
{u'input2': 115,
u'input1': 1110},
{u'input2': 15,
u'input1': 10}]))
expected_inputs = set(pytest.dicts_to_hashable(
[{u'input2': 1115, u'input1': 110},
{u'input2': 115, u'input1': 1110},
{u'input2': 15, u'input1': 10}]))

assert inputs == expected_inputs

Expand Down
1 change: 0 additions & 1 deletion tox.ini
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,6 @@ envlist = pep8,py27
usedevelop = True
install_command = pip install -U {opts} {packages}
setenv = VIRTUAL_ENV={envdir}
PYTHONHASHSEED=0
deps = -r{toxinidir}/test-requirements.txt
commands = ostestr

Expand Down

0 comments on commit 4c37224

Please sign in to comment.