Commit b336e83a authored by Jason R. Coombs's avatar Jason R. Coombs

Add compatibility for Python 2

parent 7b09ba64
...@@ -29,8 +29,8 @@ class TestEdit: ...@@ -29,8 +29,8 @@ class TestEdit:
UTF-8 should be retained. UTF-8 should be retained.
""" """
config = tmpdir.join('setup.cfg') config = tmpdir.join('setup.cfg')
self.write_text(config, '[names]\njaraco=йарацо') self.write_text(str(config), '[names]\njaraco=йарацо')
setopt.edit_config(str(config), dict(names=dict(other='yes'))) setopt.edit_config(str(config), dict(names=dict(other='yes')))
parser = self.parse_config(str(config)) parser = self.parse_config(str(config))
assert parser['names']['jaraco'] == 'йарацо' assert parser.get('names', 'jaraco') == 'йарацо'
assert parser['names']['other'] == 'yes' assert parser.get('names', 'other') == 'yes'
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment