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
Update functional test expected output #5349
Merged
Merged
Changes from all commits
Commits
Show all changes
12 commits
Select commit
Hold shift + click to select a range
7f6229b
Fix checking of ``confidence`` in the unittests (#5376)
DanielNoord 83c264c
Add ``confidence`` to all expected functional test outputs
DanielNoord b472213
Make OutputLine accept end_line and end_column
DanielNoord f2ba3fb
Update tests
DanielNoord d7f6353
Update changelog
DanielNoord 68a2205
Update tests
DanielNoord 35222c8
Fix tests
DanielNoord b430fc6
Updates tests
DanielNoord ebb31e5
Fix tests
DanielNoord 6aaa0f2
Update pylint/testutils/output_line.py
DanielNoord a6f998b
It's getting late (fix test)
DanielNoord 867ba79
Update new extensions tests
DanielNoord File filter
Filter by extension
Conversations
Failed to load comments.
Jump to
The table of contents is too big for display.
Diff view
Diff view
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
12 changes: 6 additions & 6 deletions
12
tests/functional/a/abstract/abstract_class_instantiated.txt
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,6 +1,6 @@ | ||
abstract-class-instantiated:108:4:main:Abstract class 'BadMroAbstractMethods' with abstract methods instantiated:HIGH | ||
abstract-class-instantiated:109:4:main:Abstract class 'BadClass' with abstract methods instantiated:HIGH | ||
abstract-class-instantiated:110:4:main:Abstract class 'SecondBadClass' with abstract methods instantiated:HIGH | ||
abstract-class-instantiated:111:4:main:Abstract class 'ThirdBadClass' with abstract methods instantiated:HIGH | ||
abstract-class-instantiated:128:4:main2:Abstract class 'FourthBadClass' with abstract methods instantiated:HIGH | ||
abstract-class-instantiated:143:4:main_two:Abstract class 'BadClassTwo' with abstract methods instantiated:HIGH | ||
abstract-class-instantiated:108:4:108:27:main:Abstract class 'BadMroAbstractMethods' with abstract methods instantiated:UNDEFINED | ||
abstract-class-instantiated:109:4:109:14:main:Abstract class 'BadClass' with abstract methods instantiated:UNDEFINED | ||
abstract-class-instantiated:110:4:110:20:main:Abstract class 'SecondBadClass' with abstract methods instantiated:UNDEFINED | ||
abstract-class-instantiated:111:4:111:19:main:Abstract class 'ThirdBadClass' with abstract methods instantiated:UNDEFINED | ||
abstract-class-instantiated:128:4:128:20:main2:Abstract class 'FourthBadClass' with abstract methods instantiated:UNDEFINED | ||
abstract-class-instantiated:143:4:143:17:main_two:Abstract class 'BadClassTwo' with abstract methods instantiated:UNDEFINED |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,16 +1,16 @@ | ||
abstract-method:47:0:Concrete:Method 'bbbb' is abstract in class 'Abstract' but is not overridden | ||
abstract-method:70:0:Container:Method '__hash__' is abstract in class 'Structure' but is not overridden | ||
abstract-method:70:0:Container:Method '__iter__' is abstract in class 'Structure' but is not overridden | ||
abstract-method:70:0:Container:Method '__len__' is abstract in class 'Structure' but is not overridden | ||
abstract-method:76:0:Sizable:Method '__contains__' is abstract in class 'Structure' but is not overridden | ||
abstract-method:76:0:Sizable:Method '__hash__' is abstract in class 'Structure' but is not overridden | ||
abstract-method:76:0:Sizable:Method '__iter__' is abstract in class 'Structure' but is not overridden | ||
abstract-method:82:0:Hashable:Method '__contains__' is abstract in class 'Structure' but is not overridden | ||
abstract-method:82:0:Hashable:Method '__iter__' is abstract in class 'Structure' but is not overridden | ||
abstract-method:82:0:Hashable:Method '__len__' is abstract in class 'Structure' but is not overridden | ||
abstract-method:87:0:Iterator:Method '__contains__' is abstract in class 'Structure' but is not overridden | ||
abstract-method:87:0:Iterator:Method '__hash__' is abstract in class 'Structure' but is not overridden | ||
abstract-method:87:0:Iterator:Method '__len__' is abstract in class 'Structure' but is not overridden | ||
abstract-method:106:0:BadComplexMro:Method '__hash__' is abstract in class 'Structure' but is not overridden | ||
abstract-method:106:0:BadComplexMro:Method '__len__' is abstract in class 'AbstractSizable' but is not overridden | ||
abstract-method:106:0:BadComplexMro:Method 'length' is abstract in class 'AbstractSizable' but is not overridden | ||
abstract-method:47:0:51:38:Concrete:Method 'bbbb' is abstract in class 'Abstract' but is not overridden:UNDEFINED | ||
abstract-method:70:0:72:12:Container:Method '__hash__' is abstract in class 'Structure' but is not overridden:UNDEFINED | ||
abstract-method:70:0:72:12:Container:Method '__iter__' is abstract in class 'Structure' but is not overridden:UNDEFINED | ||
abstract-method:70:0:72:12:Container:Method '__len__' is abstract in class 'Structure' but is not overridden:UNDEFINED | ||
abstract-method:76:0:78:17:Sizable:Method '__contains__' is abstract in class 'Structure' but is not overridden:UNDEFINED | ||
abstract-method:76:0:78:17:Sizable:Method '__hash__' is abstract in class 'Structure' but is not overridden:UNDEFINED | ||
abstract-method:76:0:78:17:Sizable:Method '__iter__' is abstract in class 'Structure' but is not overridden:UNDEFINED | ||
abstract-method:82:0:83:17:Hashable:Method '__contains__' is abstract in class 'Structure' but is not overridden:UNDEFINED | ||
abstract-method:82:0:83:17:Hashable:Method '__iter__' is abstract in class 'Structure' but is not overridden:UNDEFINED | ||
abstract-method:82:0:83:17:Hashable:Method '__len__' is abstract in class 'Structure' but is not overridden:UNDEFINED | ||
abstract-method:87:0:91:19:Iterator:Method '__contains__' is abstract in class 'Structure' but is not overridden:UNDEFINED | ||
abstract-method:87:0:91:19:Iterator:Method '__hash__' is abstract in class 'Structure' but is not overridden:UNDEFINED | ||
abstract-method:87:0:91:19:Iterator:Method '__len__' is abstract in class 'Structure' but is not overridden:UNDEFINED | ||
abstract-method:106:0:107:8:BadComplexMro:Method '__hash__' is abstract in class 'Structure' but is not overridden:UNDEFINED | ||
abstract-method:106:0:107:8:BadComplexMro:Method '__len__' is abstract in class 'AbstractSizable' but is not overridden:UNDEFINED | ||
abstract-method:106:0:107:8:BadComplexMro:Method 'length' is abstract in class 'AbstractSizable' but is not overridden:UNDEFINED |
4 changes: 2 additions & 2 deletions
4
tests/functional/a/access/access_member_before_definition.txt
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,2 +1,2 @@ | ||
access-member-before-definition:8:15:Aaaa.__init__:Access to member '_var2' before its definition line 9 | ||
access-member-before-definition:28:19:Bbbb.catchme:Access to member '_repo' before its definition line 30 | ||
access-member-before-definition:8:15:8:25:Aaaa.__init__:Access to member '_var2' before its definition line 9:UNDEFINED | ||
access-member-before-definition:28:19:28:29:Bbbb.catchme:Access to member '_repo' before its definition line 30:UNDEFINED |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,2 +1,2 @@ | ||
no-member:10:14:Aaaa.__init__:Instance of 'Aaaa' has no '__name__' member:INFERENCE | ||
no-member:21:22:NewClass.__init__:Instance of 'NewClass' has no '__name__' member:INFERENCE | ||
no-member:10:14:10:27:Aaaa.__init__:Instance of 'Aaaa' has no '__name__' member:INFERENCE | ||
no-member:21:22:21:35:NewClass.__init__:Instance of 'NewClass' has no '__name__' member:INFERENCE |
56 changes: 28 additions & 28 deletions
56
tests/functional/a/access/access_to_protected_members.txt
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,28 +1,28 @@ | ||
protected-access:19:14:MyClass.test:Access to a protected member _haha of a client class:HIGH | ||
protected-access:41:0::Access to a protected member _protected of a client class:HIGH | ||
protected-access:42:6::Access to a protected member _protected of a client class:HIGH | ||
protected-access:43:0::Access to a protected member _cls_protected of a client class:HIGH | ||
protected-access:44:6::Access to a protected member _cls_protected of a client class:HIGH | ||
protected-access:58:19:Issue1031.incorrect_access:Access to a protected member _protected of a client class:HIGH | ||
protected-access:72:48:Issue1802.__eq__:Access to a protected member __private of a client class:HIGH | ||
protected-access:80:32:Issue1802.not_in_special:Access to a protected member _foo of a client class:HIGH | ||
protected-access:100:32:Issue1802.__fake_special__:Access to a protected member _foo of a client class:HIGH | ||
protected-access:162:8:Issue1159.access_other_attr:Access to a protected member _bar of a client class:HIGH | ||
protected-access:163:12:Issue1159.access_other_attr:Access to a protected member _foo of a client class:HIGH | ||
no-member:194:12:Issue1159Subclass.access_missing_member:Instance of 'Issue1159Subclass' has no '_baz' member; maybe '_bar'?:INFERENCE | ||
protected-access:194:12:Issue1159Subclass.access_missing_member:Access to a protected member _baz of a client class:HIGH | ||
attribute-defined-outside-init:203:8:Issue1159Subclass.assign_missing_member:Attribute '_qux' defined outside __init__:HIGH | ||
protected-access:212:8:Issue1159Subclass.access_other_attr:Access to a protected member _bar of a client class:HIGH | ||
protected-access:213:12:Issue1159Subclass.access_other_attr:Access to a protected member _foo of a client class:HIGH | ||
protected-access:232:8:Issue3066.foobar:Access to a protected member _attr of a client class:HIGH | ||
protected-access:233:8:Issue3066.foobar:Access to a protected member _attr of a client class:HIGH | ||
protected-access:236:8:Issue3066.foobar:Access to a protected member _bar of a client class:HIGH | ||
protected-access:237:8:Issue3066.foobar:Access to a protected member _bar of a client class:HIGH | ||
protected-access:247:12:Issue3066.Aclass.foobar:Access to a protected member _attr of a client class:HIGH | ||
protected-access:249:12:Issue3066.Aclass.foobar:Access to a protected member _attr of a client class:HIGH | ||
protected-access:251:12:Issue3066.Aclass.foobar:Access to a protected member _bar of a client class:HIGH | ||
protected-access:253:12:Issue3066.Aclass.foobar:Access to a protected member _bar of a client class:HIGH | ||
protected-access:267:16:Issue3066.Aclass.Bclass.foobar:Access to a protected member _attr of a client class:HIGH | ||
protected-access:268:16:Issue3066.Aclass.Bclass.foobar:Access to a protected member _attr of a client class:HIGH | ||
protected-access:271:16:Issue3066.Aclass.Bclass.foobar:Access to a protected member _bar of a client class:HIGH | ||
protected-access:272:16:Issue3066.Aclass.Bclass.foobar:Access to a protected member _bar of a client class:HIGH | ||
protected-access:19:14:19:31:MyClass.test:Access to a protected member _haha of a client class:UNDEFINED | ||
protected-access:41:0:41:15::Access to a protected member _protected of a client class:UNDEFINED | ||
protected-access:42:6:42:21::Access to a protected member _protected of a client class:UNDEFINED | ||
protected-access:43:0:43:19::Access to a protected member _cls_protected of a client class:UNDEFINED | ||
protected-access:44:6:44:25::Access to a protected member _cls_protected of a client class:UNDEFINED | ||
protected-access:58:19:58:40:Issue1031.incorrect_access:Access to a protected member _protected of a client class:UNDEFINED | ||
protected-access:72:48:72:63:Issue1802.__eq__:Access to a protected member __private of a client class:UNDEFINED | ||
protected-access:80:32:80:42:Issue1802.not_in_special:Access to a protected member _foo of a client class:UNDEFINED | ||
protected-access:100:32:100:42:Issue1802.__fake_special__:Access to a protected member _foo of a client class:UNDEFINED | ||
protected-access:162:8:162:21:Issue1159.access_other_attr:Access to a protected member _bar of a client class:UNDEFINED | ||
protected-access:163:12:163:25:Issue1159.access_other_attr:Access to a protected member _foo of a client class:UNDEFINED | ||
no-member:194:12:194:25:Issue1159Subclass.access_missing_member:Instance of 'Issue1159Subclass' has no '_baz' member; maybe '_bar'?:INFERENCE | ||
protected-access:194:12:194:25:Issue1159Subclass.access_missing_member:Access to a protected member _baz of a client class:UNDEFINED | ||
attribute-defined-outside-init:203:8:203:21:Issue1159Subclass.assign_missing_member:Attribute '_qux' defined outside __init__:UNDEFINED | ||
protected-access:212:8:212:21:Issue1159Subclass.access_other_attr:Access to a protected member _bar of a client class:UNDEFINED | ||
protected-access:213:12:213:25:Issue1159Subclass.access_other_attr:Access to a protected member _foo of a client class:UNDEFINED | ||
protected-access:232:8:232:30:Issue3066.foobar:Access to a protected member _attr of a client class:UNDEFINED | ||
protected-access:233:8:233:37:Issue3066.foobar:Access to a protected member _attr of a client class:UNDEFINED | ||
protected-access:236:8:236:29:Issue3066.foobar:Access to a protected member _bar of a client class:UNDEFINED | ||
protected-access:237:8:237:36:Issue3066.foobar:Access to a protected member _bar of a client class:UNDEFINED | ||
protected-access:247:12:247:27:Issue3066.Aclass.foobar:Access to a protected member _attr of a client class:UNDEFINED | ||
protected-access:249:12:249:41:Issue3066.Aclass.foobar:Access to a protected member _attr of a client class:UNDEFINED | ||
protected-access:251:12:251:26:Issue3066.Aclass.foobar:Access to a protected member _bar of a client class:UNDEFINED | ||
protected-access:253:12:253:40:Issue3066.Aclass.foobar:Access to a protected member _bar of a client class:UNDEFINED | ||
protected-access:267:16:267:31:Issue3066.Aclass.Bclass.foobar:Access to a protected member _attr of a client class:UNDEFINED | ||
protected-access:268:16:268:38:Issue3066.Aclass.Bclass.foobar:Access to a protected member _attr of a client class:UNDEFINED | ||
protected-access:271:16:271:30:Issue3066.Aclass.Bclass.foobar:Access to a protected member _bar of a client class:UNDEFINED | ||
protected-access:272:16:272:37:Issue3066.Aclass.Bclass.foobar:Access to a protected member _bar of a client class:UNDEFINED |
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
That will likely not work for nodes that added
end_lineno
andend_col_offset
later. E.g.keyword
,Slice
(both only in3.9
). Maybe only compare the values ifend_lineno is not None
or better a new field in[testoptions]
to overwritePY38_PLUS
. I.e. if field is specified, ignoreend_lineno
check for all versions prior.There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Do we ever create messages on those nodes though? Even
invalid-slice-index
does not pass annodes.Slice
as itsnode
parameter. Could it be that we're fine if we ignore these?I'm not sure how the
testoptions
stuff work so I'll need some guidance if want to add a new one.There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think
only compare the values if end_lineno is not None
is the simpler because I don't know what we could put in the test_option. A condition that needs to succeed or we return None ? Seems like we'll have to launch an eval for that (with all the implication for job launched from fork via github actions) ?There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I looked into it a bit more and I think
min_pyver_end_line
could work? If we convert it to a boolean and pass it to_get_py38_none_value
that should make it future proof while testing on versions that it should.only compare the values if end_lineno is not None
is what was previously done forconfidence
with the__eq__
, I don't think that is the way to go as it allows to just never check it.There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Ho, of course. I did not think of that. Very nice solution ! Should we add one option removing the check for line/end_line/column/end_column (
min_pyver_position
to check all 4 values properly only in the version that is the most accurate) or should we add 4 options (min_pyver_end_line
,min_pyver_end_column
... in order to check line/column if line_end or column_end do not exists in other version) ?There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@cdce8p Knows more about this than I do so I'll let him respond to this but I believe
3.6
hasline
andcol_offset
for all nodes that should have it.3.8
addsend_line
andend_col_offset
for most and3.9
adds it for some that were missing.Thus I think we can create one
min_pyver_end_position
(?) which defaults to3.8.0
and can be increased if needed.Btw, I'm going to be quite busy tonight and tomorrow probably so if we want to release
2.12
today/tomorrow somebody else would likely need to start working on this. Sorry about that!There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Don't worry 😄
min_pyver_end_position
convinced me, do you agree @cdce8p ? By the way it's probably not strictly necessary to release 2.12.0 as we don't have trouble with it right now. We're probably never emitting message for Slice/Keyword nodes ?There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Found some time, see #5386