Skip to content

Commit 3118b89

Browse files
committed
Add regression test from pytoolz/cytoolz#130
1 parent f62441c commit 3118b89

File tree

1 file changed

+9
-0
lines changed

1 file changed

+9
-0
lines changed

toolz/tests/test_dicttoolz.py

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,9 @@
11
from collections import defaultdict as _defaultdict
2+
import os
23
from toolz.dicttoolz import (merge, merge_with, valmap, keymap, update_in,
34
assoc, dissoc, keyfilter, valfilter, itemmap,
45
itemfilter, assoc_in)
6+
from toolz.functoolz import identity
57
from toolz.utils import raises
68
from toolz.compatibility import PY3
79

@@ -250,3 +252,10 @@ class TestCustomMapping(TestDict):
250252
"""
251253
D = CustomMapping
252254
kw = {'factory': lambda: CustomMapping()}
255+
256+
257+
def test_environ():
258+
# See: https://github.com/pytoolz/cytoolz/issues/127
259+
assert keymap(identity, os.environ) == os.environ
260+
assert valmap(identity, os.environ) == os.environ
261+
assert itemmap(identity, os.environ) == os.environ

0 commit comments

Comments
 (0)