jamadden / mrab-regex-hg

Automatically exported from code.google.com/p/mrab-regex-hg
0 stars 2 forks source link

Unittest failure with py3.3: test_scoped_and_inline_flags #93

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
Hello,
when preparing the 2013-05-21 release for Debian, I got this test failure with 
python 3.3:

======================================================================
FAIL: test_scoped_and_inline_flags (__main__.RegexTests)
----------------------------------------------------------------------
Traceback (most recent call last):
  File "Python3/test_regex.py", line 1355, in test_scoped_and_inline_flags
    None)
AssertionError: <_regex.Match object at 0x2aaaacb4ed50> != None

----------------------------------------------------------------------
Ran 95 tests in 0.406s

FAILED (failures=1)
Traceback (most recent call last):
  File "Python3/test_regex.py", line 3079, in <module>
    test_main()
  File "Python3/test_regex.py", line 3076, in test_main
    run_unittest(RegexTests)
  File "/usr/lib/python3.3/test/support.py", line 1591, in run_unittest
    _run_suite(suite)
  File "/usr/lib/python3.3/test/support.py", line 1566, in _run_suite
    raise TestFailed(err)
test.support.TestFailed: Traceback (most recent call last):
  File "Python3/test_regex.py", line 1355, in test_scoped_and_inline_flags
    None)
AssertionError: <_regex.Match object at 0x2aaaacb4ed50> != None

Original issue reported on code.google.com by sandro.tosi on 4 Jun 2013 at 8:41

GoogleCodeExporter commented 9 years ago
I have no idea why that test failed.

I've released a new version (regex 2013-06-05), so could you re-test with that.

Here's what I'm getting:

>>> regex.purge()
>>> regex.compile(r"(?V1-i)Ab", flags=regex.I | regex.D)
STRING 'Ab'
regex.Regex('(?V1-i)Ab', flags=regex.D | regex.F | regex.V1)
>>> regex.search(r"(?V1-i)Ab", "ab", flags=regex.I).span()
Traceback (most recent call last):
  File "<pyshell#6>", line 1, in <module>
    regex.search(r"(?V1-i)Ab", "ab", flags=regex.I).span()
AttributeError: 'NoneType' object has no attribute 'span'

Original comment by re...@mrabarnett.plus.com on 5 Jun 2013 at 2:18

GoogleCodeExporter commented 9 years ago
I've tested with the new version, but the unittest failure is still there.

Original comment by sandro.tosi on 11 Jun 2013 at 7:27

GoogleCodeExporter commented 9 years ago
Did you get the same results as message #1, apart from it saying it matches?

What can you tell me about the platform? 32-bit vs 64-bit, little-endian vs 
big-endian, etc

Original comment by re...@mrabarnett.plus.com on 11 Jun 2013 at 8:01

GoogleCodeExporter commented 9 years ago
1. yep, same exact message
2. it's a 64bit Intel(R) Core(TM) i7 CPU Q 720

Original comment by sandro.tosi on 11 Jun 2013 at 8:08

GoogleCodeExporter commented 9 years ago
I still can't see where the problem lies.

Could you try the attached _regex.c in place of the released one, run just:

print(regex.search(r"(?V1-i)Ab", "ab", flags=regex.I).span())

and give me the output?

Original comment by re...@mrabarnett.plus.com on 11 Jun 2013 at 11:54

Attachments:

GoogleCodeExporter commented 9 years ago
No reply since June 2013, so closing as invalid.

Original comment by re...@mrabarnett.plus.com on 21 Oct 2013 at 11:43