Traceback (most recent call last):
File "/home/kapsh/tmp/xeger/xeger/tests/test_xeger.py", line 119, in test_zero_or_more_non_greedy
self.match(r'a*?')
File "/home/kapsh/tmp/xeger/xeger/tests/test_xeger.py", line 11, in match
assert re.match(pattern, xeger.xeger(pattern))
File "/home/kapsh/tmp/xeger/xeger/xeger.py", line 82, in xeger
result = self._build_string(parsed)
File "/home/kapsh/tmp/xeger/xeger/xeger.py", line 89, in _build_string
newstr.append(self._handle_state(state))
File "/home/kapsh/tmp/xeger/xeger/xeger.py", line 94, in _handle_state
return self._cases[opcode](value)
KeyError: MIN_REPEAT
This is because re.sre_parse.parse(pattern) returns tuple of _NamedIntConstant instead of strings.
Fix with type conevrsion and normalization: #5
Checked on 3.5 and 2.7.
xeger is completely unusable with python 3.5.
Unit test output: py35tests.txt