Fails test under python 3.6

Bug #1728270 reported by Thomas Goirand
10
This bug affects 2 people
Affects Status Importance Assigned to Milestone
python-mox3
New
Undecided
Unassigned

Bug Description

Under Py 3.6, here's failed test. It does work with Py 3.5 and 2.7 though.

======================================================================
FAIL: mox3.tests.test_mox.RegexTest.testReprWithFlags
mox3.tests.test_mox.RegexTest.testReprWithFlags
----------------------------------------------------------------------
_StringException: Traceback (most recent call last):
  File "/home/zigo/sources/openstack/pike/python-mox3/build-area/python-mox3-0.23.0/mox3/tests/test_mox.py", line 319, in testReprWithFlags
    self.assertTrue(repr(mox.Regex(r"a\s+b", flags=4)) ==
  File "/home/zigo/sources/openstack/pike/python-mox3/build-area/python-mox3-0.23.0/mox3/mox.py", line 1530, in __init__
    self.regex = re.compile(pattern, flags=flags)
  File "/usr/lib/python3.6/re.py", line 233, in compile
    return _compile(pattern, flags)
  File "/usr/lib/python3.6/re.py", line 301, in _compile
    p = sre_compile.compile(pattern, flags)
  File "/usr/lib/python3.6/sre_compile.py", line 562, in compile
    p = sre_parse.parse(p, flags)
  File "/usr/lib/python3.6/sre_parse.py", line 865, in parse
    p.pattern.flags = fix_flags(str, p.pattern.flags)
  File "/usr/lib/python3.6/sre_parse.py", line 832, in fix_flags
    raise ValueError("cannot use LOCALE flag with a str pattern")
ValueError: cannot use LOCALE flag with a str pattern

To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.