Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Test on latest PyPy #236

Merged
merged 1 commit into from
Feb 2, 2020
Merged

Test on latest PyPy #236

merged 1 commit into from
Feb 2, 2020

Conversation

hugovk
Copy link
Member

@hugovk hugovk commented Jan 19, 2020

Before: 3 failures

  1. test_syntaxerror_rerepresentation
  2. test_comments
  3. 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

After: 2 failures

  1. test_syntaxerror_rerepresentation
  2. test_comments
$ 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

Copy link
Member

@asottile asottile left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@nicoddemus nicoddemus merged commit 962ad13 into pytest-dev:master Feb 2, 2020
@hugovk hugovk deleted the upgrade-pypy branch February 2, 2020 13:02
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants