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

[testutil] More information in output for functional test fail #7948

Conversation

Pierre-Sassoulas
Copy link
Member

Type of Changes

Type
✨ New feature

Description

In order to help when the target interpreter is not installed locally and you can't update automatically yourself (pypy/old interpreters like python 3.7).

Done for: Refs #7945

Old:

Wrong output for 'postponed_evaluation_pep585.txt':
You can update the expected output automatically with: 'python tests/test_functional.py --update-functional-output -k "test_functional[postponed_evaluation_pep585]"'


- Missing lines:
OutputLine(symbol='unsubscriptable-object', lineno=96, column=15, end_lineno=None, end_column=None, object='', msg="Value 'list' is unsubscriptable", confidence='UNDEFINED')
OutputLine(symbol='unsubscriptable-object', lineno=97, column=21, end_lineno=None, end_column=None, object='', msg="Value 'list' is unsubscriptable", confidence='UNDEFINED')
OutputLine(symbol='unsubscriptable-object', lineno=98, column=15, end_lineno=None, end_column=None, object='', msg="Value 'list' is unsubscriptable", confidence='UNDEFINED')
OutputLine(symbol='unsubscriptable-object', lineno=99, column=19, end_lineno=None, end_column=None, object='', msg="Value 'list' is unsubscriptable", confidence='UNDEFINED')
OutputLine(symbol='unsubscriptable-object', lineno=100, column=15, end_lineno=None, end_column=None, object='', msg="Value 'list' is unsubscriptable", confidence='UNDEFINED')
OutputLine(symbol='unsubscriptable-object', lineno=101, column=9, end_lineno=None, end_column=None, object='', msg="Value 'list' is unsubscriptable", confidence='UNDEFINED')
OutputLine(symbol='unsubscriptable-object', lineno=101, column=14, end_lineno=None, end_column=None, object='', msg="Value 'list' is unsubscriptable", confidence='UNDEFINED')
OutputLine(symbol='unsubscriptable-object', lineno=121, column=20, end_lineno=None, end_column=None, object='func3', msg="Value 'list' is unsubscriptable", confidence='UNDEFINED')
OutputLine(symbol='unsubscriptable-object', lineno=123, column=33, end_lineno=None, end_column=None, object='func3', msg="Value 'list' is unsubscriptable", confidence='UNDEFINED')
OutputLine(symbol='unsubscriptable-object', lineno=126, column=14, end_lineno=None, end_column=None, object='func4', msg="Value 'list' is unsubscriptable", confidence='UNDEFINED')
OutputLine(symbol='unsubscriptable-object', lineno=129, column=32, end_lineno=None, end_column=None, object='func5', msg="Value 'set' is unsubscriptable", confidence='UNDEFINED')

- Unexpected lines:
OutputLine(symbol='unsubscriptable-object', lineno=104, column=15, end_lineno=None, end_column=None, object='', msg="Value 'list' is unsubscriptable", confidence='UNDEFINED')
OutputLine(symbol='unsubscriptable-object', lineno=105, column=21, end_lineno=None, end_column=None, object='', msg="Value 'list' is unsubscriptable", confidence='UNDEFINED')
OutputLine(symbol='unsubscriptable-object', lineno=106, column=15, end_lineno=None, end_column=None, object='', msg="Value 'list' is unsubscriptable", confidence='UNDEFINED')
OutputLine(symbol='unsubscriptable-object', lineno=107, column=19, end_lineno=None, end_column=None, object='', msg="Value 'list' is unsubscriptable", confidence='UNDEFINED')
OutputLine(symbol='unsubscriptable-object', lineno=108, column=15, end_lineno=None, end_column=None, object='', msg="Value 'list' is unsubscriptable", confidence='UNDEFINED')
OutputLine(symbol='unsubscriptable-object', lineno=109, column=9, end_lineno=None, end_column=None, object='', msg="Value 'list' is unsubscriptable", confidence='UNDEFINED')
OutputLine(symbol='unsubscriptable-object', lineno=109, column=14, end_lineno=None, end_column=None, object='', msg="Value 'list' is unsubscriptable", confidence='UNDEFINED')
OutputLine(symbol='unsubscriptable-object', lineno=129, column=20, end_lineno=None, end_column=None, object='func3', msg="Value 'list' is unsubscriptable", confidence='UNDEFINED')
OutputLine(symbol='unsubscriptable-object', lineno=131, column=33, end_lineno=None, end_column=None, object='func3', msg="Value 'list' is unsubscriptable", confidence='UNDEFINED')
OutputLine(symbol='unsubscriptable-object', lineno=134, column=14, end_lineno=None, end_column=None, object='func4', msg="Value 'list' is unsubscriptable", confidence='UNDEFINED')
OutputLine(symbol='unsubscriptable-object', lineno=137, column=32, end_lineno=None, end_column=None, object='func5', msg="Value 'set' is unsubscriptable", confidence='UNDEFINED')

New:

Wrong output for 'postponed_evaluation_pep585.txt':
- Missing lines:
OutputLine(symbol='unsubscriptable-object', lineno=96, column=15, end_lineno=None, end_column=None, object='', msg="Value 'list' is unsubscriptable", confidence='UNDEFINED')
OutputLine(symbol='unsubscriptable-object', lineno=97, column=21, end_lineno=None, end_column=None, object='', msg="Value 'list' is unsubscriptable", confidence='UNDEFINED')
OutputLine(symbol='unsubscriptable-object', lineno=98, column=15, end_lineno=None, end_column=None, object='', msg="Value 'list' is unsubscriptable", confidence='UNDEFINED')
OutputLine(symbol='unsubscriptable-object', lineno=99, column=19, end_lineno=None, end_column=None, object='', msg="Value 'list' is unsubscriptable", confidence='UNDEFINED')
OutputLine(symbol='unsubscriptable-object', lineno=100, column=15, end_lineno=None, end_column=None, object='', msg="Value 'list' is unsubscriptable", confidence='UNDEFINED')
OutputLine(symbol='unsubscriptable-object', lineno=101, column=9, end_lineno=None, end_column=None, object='', msg="Value 'list' is unsubscriptable", confidence='UNDEFINED')
OutputLine(symbol='unsubscriptable-object', lineno=101, column=14, end_lineno=None, end_column=None, object='', msg="Value 'list' is unsubscriptable", confidence='UNDEFINED')
OutputLine(symbol='unsubscriptable-object', lineno=121, column=20, end_lineno=None, end_column=None, object='func3', msg="Value 'list' is unsubscriptable", confidence='UNDEFINED')
OutputLine(symbol='unsubscriptable-object', lineno=123, column=33, end_lineno=None, end_column=None, object='func3', msg="Value 'list' is unsubscriptable", confidence='UNDEFINED')
OutputLine(symbol='unsubscriptable-object', lineno=126, column=14, end_lineno=None, end_column=None, object='func4', msg="Value 'list' is unsubscriptable", confidence='UNDEFINED')
OutputLine(symbol='unsubscriptable-object', lineno=129, column=32, end_lineno=None, end_column=None, object='func5', msg="Value 'set' is unsubscriptable", confidence='UNDEFINED')

- Unexpected lines:
OutputLine(symbol='unsubscriptable-object', lineno=104, column=15, end_lineno=None, end_column=None, object='', msg="Value 'list' is unsubscriptable", confidence='UNDEFINED')
OutputLine(symbol='unsubscriptable-object', lineno=105, column=21, end_lineno=None, end_column=None, object='', msg="Value 'list' is unsubscriptable", confidence='UNDEFINED')
OutputLine(symbol='unsubscriptable-object', lineno=106, column=15, end_lineno=None, end_column=None, object='', msg="Value 'list' is unsubscriptable", confidence='UNDEFINED')
OutputLine(symbol='unsubscriptable-object', lineno=107, column=19, end_lineno=None, end_column=None, object='', msg="Value 'list' is unsubscriptable", confidence='UNDEFINED')
OutputLine(symbol='unsubscriptable-object', lineno=108, column=15, end_lineno=None, end_column=None, object='', msg="Value 'list' is unsubscriptable", confidence='UNDEFINED')
OutputLine(symbol='unsubscriptable-object', lineno=109, column=9, end_lineno=None, end_column=None, object='', msg="Value 'list' is unsubscriptable", confidence='UNDEFINED')
OutputLine(symbol='unsubscriptable-object', lineno=109, column=14, end_lineno=None, end_column=None, object='', msg="Value 'list' is unsubscriptable", confidence='UNDEFINED')
OutputLine(symbol='unsubscriptable-object', lineno=129, column=20, end_lineno=None, end_column=None, object='func3', msg="Value 'list' is unsubscriptable", confidence='UNDEFINED')
OutputLine(symbol='unsubscriptable-object', lineno=131, column=33, end_lineno=None, end_column=None, object='func3', msg="Value 'list' is unsubscriptable", confidence='UNDEFINED')
OutputLine(symbol='unsubscriptable-object', lineno=134, column=14, end_lineno=None, end_column=None, object='func4', msg="Value 'list' is unsubscriptable", confidence='UNDEFINED')
OutputLine(symbol='unsubscriptable-object', lineno=137, column=32, end_lineno=None, end_column=None, object='func5', msg="Value 'set' is unsubscriptable", confidence='UNDEFINED')

You can update the expected output automatically with:
'python tests/test_functional.py --update-functional-output -k "test_functional[postponed_evaluation_pep585]"'

Here's the update text in case you can't:
unsubscriptable-object:23:15:None:None::Value 'list' is unsubscriptable:UNDEFINED
unsubscriptable-object:28:25:None:None:CustomIntListError:Value 'list' is unsubscriptable:UNDEFINED
unsubscriptable-object:32:28:None:None::Value 'list' is unsubscriptable:UNDEFINED
unsubscriptable-object:34:24:None:None::Value 'list' is unsubscriptable:UNDEFINED
unsubscriptable-object:36:14:None:None::Value 'list' is unsubscriptable:UNDEFINED
unsubscriptable-object:41:36:None:None::Value 'list' is unsubscriptable:UNDEFINED
unsubscriptable-object:51:54:None:None::Value 'list' is unsubscriptable:UNDEFINED
unsubscriptable-object:53:60:None:None::Value 'list' is unsubscriptable:UNDEFINED
unsubscriptable-object:104:15:None:None::Value 'list' is unsubscriptable:UNDEFINED
unsubscriptable-object:105:21:None:None::Value 'list' is unsubscriptable:UNDEFINED
unsubscriptable-object:106:15:None:None::Value 'list' is unsubscriptable:UNDEFINED
unsubscriptable-object:107:19:None:None::Value 'list' is unsubscriptable:UNDEFINED
unsubscriptable-object:108:15:None:None::Value 'list' is unsubscriptable:UNDEFINED
unsubscriptable-object:109:9:None:None::Value 'list' is unsubscriptable:UNDEFINED
unsubscriptable-object:109:14:None:None::Value 'list' is unsubscriptable:UNDEFINED
unsubscriptable-object:129:20:None:None:func3:Value 'list' is unsubscriptable:UNDEFINED
unsubscriptable-object:131:33:None:None:func3:Value 'list' is unsubscriptable:UNDEFINED
unsubscriptable-object:134:14:None:None:func4:Value 'list' is unsubscriptable:UNDEFINED
unsubscriptable-object:137:32:None:None:func5:Value 'set' is unsubscriptable:UNDEFINED

In order to help when the target interpreter is not installed locally
and you can't update automatically yourself (pypy/old interpreters
like python 3.7).

Done for: Refs pylint-dev#7945
@Pierre-Sassoulas Pierre-Sassoulas added Maintenance Discussion or action around maintaining pylint or the dev workflow Skip news 🔇 This change does not require a changelog entry labels Dec 15, 2022
@coveralls
Copy link

Pull Request Test Coverage Report for Build 3703756299

  • 0 of 7 (0.0%) changed or added relevant lines in 1 file are covered.
  • 2 unchanged lines in 1 file lost coverage.
  • Overall coverage decreased (-0.03%) to 95.445%

Changes Missing Coverage Covered Lines Changed/Added Lines %
pylint/testutils/lint_module_test.py 0 7 0.0%
Files with Coverage Reduction New Missed Lines %
pylint/testutils/lint_module_test.py 2 84.62%
Totals Coverage Status
Change from base Build 3699236593: -0.03%
Covered Lines: 17663
Relevant Lines: 18506

💛 - Coveralls

@github-actions
Copy link
Contributor

🤖 Effect of this PR on checked open source code: 🤖

Effect on django:
The following messages are now emitted:

  1. too-many-instance-attributes:
    Too many instance attributes (10/7)
    https://github.com/django/django/blob/d44ee518c4c110af25bebdbedbbf9fba04d197aa/django/db/models/expressions.py#L169

The following messages are no longer emitted:

  1. redefined-variable-type:
    Redefinition of field type from django.db.models.fields.related.OneToOneField to django.forms.widgets.Widget
    https://github.com/django/django/blob/d44ee518c4c110af25bebdbedbbf9fba04d197aa/django/db/models/base.py#L346
  2. too-many-instance-attributes:
    Too many instance attributes (9/7)
    https://github.com/django/django/blob/d44ee518c4c110af25bebdbedbbf9fba04d197aa/django/db/models/expressions.py#L169

Effect on music21:
The following messages are now emitted:

  1. too-many-instance-attributes:
    Too many instance attributes (34/20)
    https://github.com/cuthbertLab/music21/blob/cddb10409b934779c8b28999730fce0621fc2f7f/music21/roman.py#L1395
  2. invalid-name:
    Attribute name "id" doesn't conform to '[a-z_][A-Za-z0-9_]{2,30}$' pattern
    https://github.com/cuthbertLab/music21/blob/cddb10409b934779c8b28999730fce0621fc2f7f/music21/prebase.py#L293
  3. suppressed-message:
    Suppressed 'attribute-defined-outside-init' (from line 3193)
    https://github.com/cuthbertLab/music21/blob/cddb10409b934779c8b28999730fce0621fc2f7f/music21/base.py#L3193
  4. suppressed-message:
    Suppressed 'attribute-defined-outside-init' (from line 3264)
    https://github.com/cuthbertLab/music21/blob/cddb10409b934779c8b28999730fce0621fc2f7f/music21/base.py#L3264
  5. suppressed-message:
    Suppressed 'method-hidden' (from line 11486)
    https://github.com/cuthbertLab/music21/blob/cddb10409b934779c8b28999730fce0621fc2f7f/music21/stream/base.py#L11487
  6. redefined-variable-type:
    Redefinition of self.activeInstrument type from music21.instrument.UnpitchedPercussion to music21.instrument.Instrument
    https://github.com/cuthbertLab/music21/blob/cddb10409b934779c8b28999730fce0621fc2f7f/music21/musicxml/xmlToM21.py#L2075

The following messages are no longer emitted:

  1. invalid-name:
    Attribute name "id" doesn't conform to '[a-z_][A-Za-z0-9_]{2,30}$' pattern
    https://github.com/cuthbertLab/music21/blob/cddb10409b934779c8b28999730fce0621fc2f7f/music21/base.py#L576
  2. useless-suppression:
    Useless suppression of 'attribute-defined-outside-init'
    https://github.com/cuthbertLab/music21/blob/cddb10409b934779c8b28999730fce0621fc2f7f/music21/base.py#L3193
  3. useless-suppression:
    Useless suppression of 'attribute-defined-outside-init'
    https://github.com/cuthbertLab/music21/blob/cddb10409b934779c8b28999730fce0621fc2f7f/music21/base.py#L3264
  4. too-many-instance-attributes:
    Too many instance attributes (33/20)
    https://github.com/cuthbertLab/music21/blob/cddb10409b934779c8b28999730fce0621fc2f7f/music21/roman.py#L1395
  5. redefined-variable-type:
    Redefinition of self.previousRn type from django.forms.widgets.Widget to music21.note.Rest
    https://github.com/cuthbertLab/music21/blob/cddb10409b934779c8b28999730fce0621fc2f7f/music21/romanText/translate.py#L795
  6. redefined-variable-type:
    Redefinition of self.previousChordInMeasure type from django.forms.widgets.Widget to music21.note.Rest
    https://github.com/cuthbertLab/music21/blob/cddb10409b934779c8b28999730fce0621fc2f7f/music21/romanText/translate.py#L794
  7. redefined-variable-type:
    Redefinition of lastChord type from music21.chord.Chord to django.forms.widgets.Widget
    https://github.com/cuthbertLab/music21/blob/cddb10409b934779c8b28999730fce0621fc2f7f/music21/analysis/neoRiemannian.py#L435
  8. useless-suppression:
    Useless suppression of 'method-hidden'
    https://github.com/cuthbertLab/music21/blob/cddb10409b934779c8b28999730fce0621fc2f7f/music21/stream/base.py#L11486
  9. redefined-variable-type:
    Redefinition of self.activeInstrument type from django.forms.widgets.Widget to music21.instrument.Instrument
    https://github.com/cuthbertLab/music21/blob/cddb10409b934779c8b28999730fce0621fc2f7f/music21/musicxml/xmlToM21.py#L2075

Effect on pandas:
The following messages are now emitted:

  1. not-an-iterable:
    Non-iterable value index.values is used in an iterating context
    https://github.com/pandas-dev/pandas/blob/bf5ee72d5b81962db91fa12f637b4369d3e30f77/pandas/tests/indexing/multiindex/test_sorted.py#L146

The following messages are no longer emitted:

  1. redefined-variable-type:
    Redefinition of expected type from tuple to pandas.core.series.Series
    https://github.com/pandas-dev/pandas/blob/bf5ee72d5b81962db91fa12f637b4369d3e30f77/pandas/tests/series/methods/test_astype.py#L499

This comment was generated for commit 3f778f9

@Pierre-Sassoulas Pierre-Sassoulas merged commit a590e68 into pylint-dev:main Dec 15, 2022
@Pierre-Sassoulas Pierre-Sassoulas deleted the better-output-in-functional-tests branch December 15, 2022 22:04
Pierre-Sassoulas added a commit to Pierre-Sassoulas/pylint that referenced this pull request Dec 15, 2022
…t-dev#7948)

In order to help when the target interpreter is not installed locally
and you can't update automatically yourself (pypy/old interpreters
like python 3.7).

Done for: Refs pylint-dev#7945
Pierre-Sassoulas added a commit to Pierre-Sassoulas/pylint that referenced this pull request Dec 15, 2022
…t-dev#7948)

In order to help when the target interpreter is not installed locally
and you can't update automatically yourself (pypy/old interpreters
like python 3.7).

Done for: Refs pylint-dev#7945
Pierre-Sassoulas added a commit that referenced this pull request Dec 15, 2022
In order to help when the target interpreter is not installed locally
and you can't update automatically yourself (pypy/old interpreters
like python 3.7).

Done for: Refs #7945
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Maintenance Discussion or action around maintaining pylint or the dev workflow Skip news 🔇 This change does not require a changelog entry
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants