test_gen_feature_definitions.py: method already defined line 85 E0102 (pylint)
Categories
(Developer Infrastructure :: Lint and Formatting, defect)
Tracking
(firefox80 fixed)
Tracking | Status | |
---|---|---|
firefox80 | --- | fixed |
People
(Reporter: Sylvestre, Assigned: kanishk509, Mentored)
References
(Blocks 1 open bug)
Details
(Keywords: good-first-bug, Whiteboard: [lang=python])
Attachments
(1 file, 3 obsolete files)
+++ This bug was initially created as a clone of Bug #1647259 +++
toolkit/components/featuregates/test/python/test_gen_feature_definitions.py
93:4 error method already defined line 85 E0102 (pylint)
We should probably remove one of the two
To reproduce :
$ ./mach lint -l pylint -n toolkit/components/featuregates/test/python/test_gen_feature_definitions.py
As the change should be easy, it is just to learn how to contribute to Firefox.
Tutorial to contribute:
https://firefox-source-docs.mozilla.org/contributing/contribution_quickref.html
Please don't ask for the bug to be assigned. It will be automatically assigned to the first patch.
Comment 1•4 years ago
|
||
Updated•4 years ago
|
Updated•4 years ago
|
Updated•4 years ago
|
Reporter | ||
Comment 2•4 years ago
|
||
Oh, please keep it :)
I was just talking about future commits
Updated•4 years ago
|
Hey, this is my first commit to the Mozilla codebase. I've added the author of the file as well as the reporter of the bug as reviewers.
Updated•4 years ago
|
Updated•4 years ago
|
Comment 7•4 years ago
•
|
||
The instructions in comment 0 are not correct. We should not remove the "duplicate" function. Each function in this file is a test, and the test in question is unique. The name is a duplicate, so the name should be changed, instead of the function being removed.
(In reply to Michael Cooper [:mythmon] from comment #7)
The instructions in comment 0 are not correct. We should not remove the "duplicate" function. Each function in this file is a test, and the test in question is unique. The name is a duplicate, so the name should be changed, instead of the function being removed.
I understand. I will rename one of the functions. On searchfox I see that there are no references to the function test_str_with_file
, so it does not need to be renamed anywhere else I assume?
Comment 9•4 years ago
|
||
That's correct. This function is automatically discovered by the test runner. The name doesn't matter, except that it start with test_
and it be descriptive of the test. No where else needs updated.
Updated•4 years ago
|
Assignee | ||
Comment 10•4 years ago
|
||
I have renamed it properly (I think it was misnamed by mistake originally, from the body of the test, it is clear that one of them should be named test_repr_with_file
). I have submitted the patch for review.
Comment 11•4 years ago
|
||
Pushed by sledru@mozilla.com: https://hg.mozilla.org/integration/autoland/rev/97213363d221 renamed one declaration of test_str_with_file to test_repr_with_file. r=mythmon
Comment 12•4 years ago
|
||
Backed out changeset 97213363d221 (bug 1647260) for linux build bustages at test_gen_feature_definitions.py.
https://hg.mozilla.org/integration/autoland/rev/d0b5cdb6b19486225a1ea90a5f962cd3e567eee6
Failure log:
https://treeherder.mozilla.org/logviewer.html#/jobs?job_id=307997864&repo=autoland&lineNumber=61226
Assignee | ||
Comment 13•4 years ago
|
||
(In reply to Cristian Brindusan [:cbrindusan] from comment #12)
Backed out changeset 97213363d221 (bug 1647260) for linux build bustages at test_gen_feature_definitions.py.
https://hg.mozilla.org/integration/autoland/rev/d0b5cdb6b19486225a1ea90a5f962cd3e567eee6Failure log:
https://treeherder.mozilla.org/logviewer.html#/jobs?job_id=307997864&repo=autoland&lineNumber=61226
This seems to be an error thrown by the test test_str_with_file
, which wasn't changed by me.
From the failure logs, it looks like we are missing the .txt
extension in our expected error message.
What should be done?
Updated•4 years ago
|
Assignee | ||
Comment 14•4 years ago
|
||
I added .txt
extension in expected error string for assert in assert str(error) == 'In file "some/bad/file.txt": oops'
.
The builds that were previously failing in the autoland are now passing.
https://treeherder.mozilla.org/#/jobs?repo=try&revision=cdb80dc5b44097ee3ea580ac50f271cbebaa8ced
I've re-opened the patch for review.
Assignee | ||
Comment 15•4 years ago
|
||
The patch has been accepted but not landed yet. Anything remaining to be done wrt this bug?
Reporter | ||
Comment 16•4 years ago
|
||
See:
https://firefox-source-docs.mozilla.org/contributing/contribution_quickref.html#to-push-a-change-in-the-code-base
(i did it for you)
Reporter | ||
Updated•4 years ago
|
Comment 17•4 years ago
|
||
Pushed by sledru@mozilla.com: https://hg.mozilla.org/integration/autoland/rev/97cef5b7f906 renamed one declaration of test_str_with_file to test_repr_with_file and added ".txt" extension in expected error string for assert. r=mythmon
Comment 18•4 years ago
|
||
bugherder |
Updated•2 years ago
|
Description
•