-
Notifications
You must be signed in to change notification settings - Fork 293
Open
Labels
Description
Hi all,
the tests/test_future/test_builtins.py test fails with Python3.5:
=================================== FAILURES ===================================
___________________________ BuiltinTest.test_compile ___________________________
self = <test_future.test_builtins.BuiltinTest testMethod=test_compile>
def test_compile(self):
compile('print(1)\n', '', 'exec')
bom = b'\xef\xbb\xbf'
compile(bom + b'print(1)\n', '', 'exec')
compile(source='pass', filename='?', mode='exec')
compile(dont_inherit=0, filename='tmp', source='0', mode='eval')
compile('pass', '?', dont_inherit=1, mode='exec')
# Fails on Py2.7:
# Was: compile(memoryview(b"text"), "name", "exec")
self.assertRaises(TypeError, compile)
self.assertRaises(ValueError, compile, 'print(42)\n', '<string>', 'badmode')
self.assertRaises(ValueError, compile, 'print(42)\n', '<string>', 'single', 0xff)
# Raises TypeError in Python < v3.5, ValueError in v3.5:
# self.assertRaises(TypeError, compile, chr(0), 'f', 'exec')
self.assertRaises(TypeError, compile, 'pass', '?', 'exec',
mode='eval', source='0', filename='tmp')
compile('print("\xe5")\n', '', 'exec')
> self.assertRaises(TypeError, compile, chr(0), 'f', 'exec')
E ValueError: source code string cannot contain null bytes
tests/test_future/test_builtins.py:532: ValueError
1 failed, 975 passed, 51 skipped, 49 xfailed, 2 xpassed, 1 warnings in 40.77 seconds
future
build log on Fedora with Python2.7/Python3.5: https://kojipkgs.fedoraproject.org//work/tasks/471/11780471/build.log
Any suggestion ?
Thanks.