Skip to content

Commit

Permalink
Merge branch 'feature/iterate-over-config-entries' into feature/retur…
Browse files Browse the repository at this point in the history
…n-config-entry-from-iter
  • Loading branch information
thecjharries committed Mar 17, 2018
2 parents 835e711 + 52de16a commit 8ca94fc
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 3 deletions.
2 changes: 1 addition & 1 deletion pygit2/config.py
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,7 @@ def next(self):

def __next__(self):
entry = self._next_entry()
return entry.name
return entry


class ConfigMultivarIterator(ConfigIterator):
Expand Down
5 changes: 3 additions & 2 deletions test/test_config.py
Original file line number Diff line number Diff line change
Expand Up @@ -173,8 +173,9 @@ def test_iterator(self):
config = self.repo.config
lst = {}

for name in config:
lst[name] = config[name]
for entry in config:
self.assertGreater(entry.level, -1)
lst[entry.name] = entry.value_string

self.assertTrue('core.bare' in lst)
self.assertTrue(lst['core.bare'])
Expand Down

0 comments on commit 8ca94fc

Please sign in to comment.