Add defaults to DummyEnv so we don't have to set up a basic environment every time.

This commit is contained in:
Jamie Bliss 2017-01-07 15:31:18 -05:00
parent 66e92d3641
commit 6db7df4bec

View file

@ -85,8 +85,13 @@ class DummyHistory:
class DummyEnv(MutableMapping):
DEFAULTS = {
'XONSH_DEBUG': 1,
}
def __init__(self, *args, **kwargs):
self._d = dict(*args, **kwargs)
self._d = self.DEFAULTS.copy()
self._d.update(dict(*args, **kwargs))
def detype(self):
return {k: str(v) for k, v in self._d.items()}