Skip to content

Commit

Permalink
py2 and py3
Browse files Browse the repository at this point in the history
  • Loading branch information
ralsina committed May 8, 2017
1 parent ce8682d commit fbd5730
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion tests/test_shortcodes.py
Expand Up @@ -88,6 +88,9 @@ def test_errors(self):
def test_extract_shortcodes(input, expected, monkeypatch):

i = iter('SC%d' % i for i in range(1, 100))
monkeypatch.setattr(shortcodes, '_new_sc_id', i.next)
if sys.version[0] < 3:
monkeypatch.setattr(shortcodes, '_new_sc_id', i.next)
else:
monkeypatch.setattr(shortcodes, '_new_sc_id', i.__next__)
extracted = shortcodes.extract_shortcodes(input)
assert extracted == expected

0 comments on commit fbd5730

Please sign in to comment.