strengthen the ini assertion

This commit is contained in:
Buck Golemon 2015-10-09 09:57:40 -07:00
parent 470e4f9e91
commit 67236d6de3
1 changed files with 6 additions and 0 deletions

View File

@ -309,6 +309,11 @@ class TestConfigFromdictargs:
}
cwd = tmpdir.join('a/b')
cwd.join('pytest.ini').ensure().write(py.code.Source("""
[pytest]
name = wrong-value
should_not_be_set = true
"""))
with cwd.ensure(dir=True).as_cwd():
config = Config.fromdictargs(option_dict, ())
@ -319,6 +324,7 @@ class TestConfigFromdictargs:
# this indicates this is the file used for getting configuration values
assert config.inifile == inifile
assert config.inicfg.get('name') == 'value'
assert config.inicfg.get('should_not_be_set') is None
def test_options_on_small_file_do_not_blow_up(testdir):