diff options
| author | Jason R. Coombs <jaraco@jaraco.com> | 2021-09-08 21:29:26 -0400 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2021-09-08 21:29:26 -0400 |
| commit | fdb818def5e262eee8edc4cc7ba1b79461096bfc (patch) | |
| tree | 53d59eff9b8c32668a28a28978135906ed2f13b6 /setuptools | |
| parent | 4fa006da4bbced755463b99914029c05c61523da (diff) | |
| parent | 3ce32eb107d4e6436aa687fa6a7fa4a7dad25d1f (diff) | |
| download | python-setuptools-git-fdb818def5e262eee8edc4cc7ba1b79461096bfc.tar.gz | |
Merge pull request #2774 from aerusso/mrs/edit_config-case-sensitive
Preserve case of keys in edit_config
Diffstat (limited to 'setuptools')
| -rw-r--r-- | setuptools/tests/test_setopt.py | 9 |
1 files changed, 6 insertions, 3 deletions
diff --git a/setuptools/tests/test_setopt.py b/setuptools/tests/test_setopt.py index 61dc68b6..36008632 100644 --- a/setuptools/tests/test_setopt.py +++ b/setuptools/tests/test_setopt.py @@ -31,8 +31,11 @@ class TestEdit: def test_case_retained(self, tmpdir): """ + When editing a file, case of keys should be retained. """ config = tmpdir.join('setup.cfg') - self.write_text(str(config), '[names]\nJARACO=jaraco') - setopt.edit_config(str(config), dict()) - assert 'JARACO' in config.read_text(encoding='ascii') + self.write_text(str(config), '[names]\nFoO=bAr') + setopt.edit_config(str(config), dict(names=dict(oTher='yes'))) + actual = config.read_text(encoding='ascii') + assert 'FoO' in actual + assert 'oTher' in actual |
