Closed hugovk closed 4 years ago
test_syntaxerror_rerepresentation
test_comments
TestImportlibImport.test_pyimport_relative_import_fails
$ python --version Python 3.5.3 (fdd60ed87e94, Apr 24 2018, 06:10:04) [PyPy 6.0.0 with GCC 6.2.0 20160901]
=================================== FAILURES =================================== ______________________ test_syntaxerror_rerepresentation _______________________ def test_syntaxerror_rerepresentation(): ex = py.test.raises(SyntaxError, py.code.compile, 'xyz xyz') assert ex.value.lineno == 1 > assert ex.value.offset in (4,7) # XXX pypy/jython versus cpython? E assert 5 in (4, 7) E + where 5 = SyntaxError('xyz xyz\n ^\n(code was compiled probably from here: <3-codegen /home/travis/virtualenv/pypy3.5-6.0.0/site-packages/_pytest/python.py:1318>)',).offset E + where SyntaxError('xyz xyz\n ^\n(code was compiled probably from here: <3-codegen /home/travis/virtualenv/pypy3.5-6.0.0/site-packages/_pytest/python.py:1318>)',) = <ExceptionInfo SyntaxError tblen=3>.value testing/code/test_source.py:106: AssertionError ________________________________ test_comments _________________________________ def test_comments(): source = '''def test(): "comment 1" x = 1 # comment 2 # comment 3 assert False """ comment 4 """ ''' for line in range(2,6): assert str(getstatement(line, source)) == ' x = 1' for line in range(6,10): > assert str(getstatement(line, source)) == ' assert False' E assert '"""\ncomment 4\n"""' == ' assert False' E + assert False E - """ E - comment 4 E - """ testing/code/test_source.py:516: AssertionError ___________ TestImportlibImport.test_pyimport_relative_import_fails ____________ self = <test_local.TestImportlibImport object at 0x00007f11e2eb0c60> path1 = local('/tmp/pytest-of-travis/pytest-0/path0') def test_pyimport_relative_import_fails(self, path1): otherdir = path1.join('otherdir') with pytest.raises(ImportError): > otherdir.join('a.py').pyimport(**self.OPTS) /home/travis/build/pytest-dev/py/testing/path/test_local.py:645: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /home/travis/build/pytest-dev/py/py/_path/local.py:684: in pyimport spec.loader.exec_module(mod) <builtin>/frozen importlib._bootstrap_external:686: in exec_module ??? <frozen importlib._bootstrap>:223: in _call_with_frames_removed ??? _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ > from .b import stuff as result E SystemError: Parent module '' not loaded, cannot perform relative import otherdir/a.py:1: SystemError ========= 3 failed, 820 passed, 37 skipped, 5 xfailed in 25.93 seconds =========
https://travis-ci.org/pytest-dev/py/jobs/639094218
$ python --version Python 3.6.1 (784b254d6699, Apr 14 2019, 10:22:42) [PyPy 7.1.1-beta0 with GCC 6.2.0 20160901]
=================================== FAILURES =================================== ______________________ test_syntaxerror_rerepresentation _______________________ def test_syntaxerror_rerepresentation(): ex = py.test.raises(SyntaxError, py.code.compile, 'xyz xyz') assert ex.value.lineno == 1 > assert ex.value.offset in (4,7) # XXX pypy/jython versus cpython? E assert 5 in (4, 7) E + where 5 = SyntaxError('xyz xyz\n ^\n(code was compiled probably from here: <3-codegen /home/travis/virtualenv/pypy3.6-7.1.1/site-packages/_pytest/python.py:1318>)',).offset E + where SyntaxError('xyz xyz\n ^\n(code was compiled probably from here: <3-codegen /home/travis/virtualenv/pypy3.6-7.1.1/site-packages/_pytest/python.py:1318>)',) = <ExceptionInfo SyntaxError tblen=3>.value testing/code/test_source.py:106: AssertionError ________________________________ test_comments _________________________________ def test_comments(): source = '''def test(): "comment 1" x = 1 # comment 2 # comment 3 assert False """ comment 4 """ ''' for line in range(2,6): assert str(getstatement(line, source)) == ' x = 1' for line in range(6,10): > assert str(getstatement(line, source)) == ' assert False' E assert '"""\ncomment 4\n"""' == ' assert False' E + assert False E - """ E - comment 4 E - """ testing/code/test_source.py:516: AssertionError ========= 2 failed, 821 passed, 37 skipped, 5 xfailed in 24.92 seconds =========
https://travis-ci.org/hugovk/py/jobs/639091764
Before: 3 failures
test_syntaxerror_rerepresentation
test_comments
TestImportlibImport.test_pyimport_relative_import_fails
https://travis-ci.org/pytest-dev/py/jobs/639094218
After: 2 failures
test_syntaxerror_rerepresentation
test_comments
https://travis-ci.org/hugovk/py/jobs/639091764