Anyone has ideas on why running `tox` fails but running the same test in the tox-created venv passed?
Here is an example test:
metrics.py
```
def get_test_value():
return {1 : 'd', 2: 'e'}
def _test_func():
metrics = get_test_value().values()
metrics = [info for info in metrics]
return metrics
```
metrics_test.py:
```
from metrics import _test_func
class TestMetrics(unittest.TestCase):
def test_example(self):
return_value1 = {'metric_func_name': 'a'}
return_value2 = {'metric_func_name': 'b'}
expect(target).get_test_value.once().and_return({
'test1': return_value1,
'test2': return_value2,
})
self.assertEqual(_test_func(), [return_value1, return_value2])
```
This test fails half of the time because the order can change:
```
E AssertionError: Lists differ: [{'metric_func_name': 'b'}, {'... != [{'metric_func_name': 'a'}, {'...
E
E First differing element 0:
E {'metric_func_name': 'b'}
E {'metric_func_name': 'a'}
E
E - [{'metric_func_name': 'b'}, {'metric_func_name': 'a'}]
E ? ^ ^
E
E + [{'metric_func_name': 'a'}, {'metric_func_name': 'b'}]
E ?
```