test multiple mutations for config

This detects the problem in #2979
This commit is contained in:
Ryan Farley 2017-09-17 13:24:05 -05:00
parent 21a10fcb17
commit b35a808712

View File

@ -205,9 +205,11 @@ class TestConfigPy:
assert config.instance._values['bindings.commands'] == expected
def test_mutating(self, confpy):
confpy.write('c.aliases["foo"] = "message-info foo"')
confpy.write('c.aliases["foo"] = "message-info foo"',
'c.aliases["bar"] = "message-info bar"')
configfiles.read_config_py(confpy.filename)
assert config.instance._values['aliases']['foo'] == 'message-info foo'
assert config.instance._values['aliases']['bar'] == 'message-info bar'
def test_reading_default_location(self, config_tmpdir):
(config_tmpdir / 'config.py').write_text(