[issue24928] mock.patch.dict spoils order of items in collections.OrderedDict
Emmanuel Arias
report at bugs.python.org
Sat Jan 5 09:03:40 EST 2019
Emmanuel Arias <emmanuelarias30 at gmail.com> added the comment:
Sorry I was wrong.
On
```python
foo = OrderedDict()
foo['a'] = object()
foo['b'] = 'something'
```
I was write "first" and "second" like key and fail in
```python
@patch.dict(foo, OrderedDict(update_values))
def test():
self.assertEqual(list(foo), sorted(foo))
test()
```
Sorry.
Now I am sending the PR
----------
_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue24928>
_______________________________________
More information about the Python-bugs-list
mailing list