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

Don't collect regrtest_data #3244

Closed
wants to merge 1 commit into from

Conversation

felixonmars
Copy link

@felixonmars felixonmars commented Nov 15, 2019

Steps

  • Add yourself to CONTRIBUTORS if you are a new contributor.
  • Add a ChangeLog entry describing what your PR does.
  • If it's a new feature or an important bug fix, add a What's New entry in doc/whatsnew/<current release.rst>.
  • Write a good description on what the PR does.

Description

This fixes the current test failures in master:

============================= test session starts ==============================
platform linux -- Python 3.8.0, pytest-5.2.3, py-1.8.0, pluggy-0.13.0
rootdir: /build/python-pylint/src/pylint-pylint-2.4.4, inifile: pytest.ini
collected 1338 items / 2 errors / 201 deselected / 1135 selected

==================================== ERRORS ====================================
_________ ERROR collecting tests/regrtest_data/bad_package/__init__.py _________
/usr/lib/python3.8/site-packages/_pytest/python.py:512: in _importtestmodule
    mod = self.fspath.pyimport(ensuresyspath=importmode)
/usr/lib/python3.8/site-packages/py/_path/local.py:701: in pyimport
    __import__(modname)
E     File "/build/python-pylint/src/pylint-pylint-2.4.4/tests/regrtest_data/bad_package/__init__.py", line 2
E       raise missing.Missing..
E                             ^
E   SyntaxError: invalid syntax
_________ ERROR collecting tests/regrtest_data/beyond_top/__init__.py __________
tests/regrtest_data/beyond_top/__init__.py:1: in <module>
    from ... import Something
E   ValueError: attempted relative import beyond top-level package
!!!!!!!!!!!!!!!!!!! Interrupted: 2 errors during collection !!!!!!!!!!!!!!!!!!!!
======================= 201 deselected, 2 error in 1.77s =======================

Type of Changes

Type
🐛 Bug fix

This fixes the current test failures in master:

```
============================= test session starts ==============================
platform linux -- Python 3.8.0, pytest-5.2.3, py-1.8.0, pluggy-0.13.0
rootdir: /build/python-pylint/src/pylint-pylint-2.4.4, inifile: pytest.ini
collected 1338 items / 2 errors / 201 deselected / 1135 selected

==================================== ERRORS ====================================
_________ ERROR collecting tests/regrtest_data/bad_package/__init__.py _________
/usr/lib/python3.8/site-packages/_pytest/python.py:512: in _importtestmodule
    mod = self.fspath.pyimport(ensuresyspath=importmode)
/usr/lib/python3.8/site-packages/py/_path/local.py:701: in pyimport
    __import__(modname)
E     File "/build/python-pylint/src/pylint-pylint-2.4.4/tests/regrtest_data/bad_package/__init__.py", line 2
E       raise missing.Missing..
E                             ^
E   SyntaxError: invalid syntax
_________ ERROR collecting tests/regrtest_data/beyond_top/__init__.py __________
tests/regrtest_data/beyond_top/__init__.py:1: in <module>
    from ... import Something
E   ValueError: attempted relative import beyond top-level package
!!!!!!!!!!!!!!!!!!! Interrupted: 2 errors during collection !!!!!!!!!!!!!!!!!!!!
======================= 201 deselected, 2 error in 1.77s =======================
```
@ngie-eign
Copy link
Contributor

This definitely addresses some of the issues I was seeing yesterday, but not all of the issues. Unfortunately one of the tests still fails on master in all environments (it looks like one or more of the APIs changed).

@PCManticore
Copy link
Contributor

Thanks for the PR @felixonmars I left a comment on the similar PR from astroid: pylint-dev/astroid#723 (comment) Not sure how to reproduce these errors you are getting.

@felixonmars
Copy link
Author

I ran a plain pytest command in the source tree. I remember seeing this in master too but I cannot reproduce now. Perhaps it was a temporary error with pytest 5.2.2 or 5.2.3 but now fixed in 5.2.4.

@felixonmars
Copy link
Author

UPDATE: It was pytest-dev/pytest#6194

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.

3 participants