Skip to content
Permalink
Browse files
py2 and py3
  • Loading branch information
ralsina committed May 8, 2017
1 parent ce8682d commit fbd57303c218a2fbc85d93f8b291be01d5eb7097
Showing 1 changed file with 4 additions and 1 deletion.
@@ -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.