Closed
Bug 1436802
Opened 7 years ago
Closed 7 years ago
Create python unittests (or cramtests) for lint implementations
Categories
(Developer Infrastructure :: Lint and Formatting, enhancement, P3)
Developer Infrastructure
Lint and Formatting
Tracking
(firefox61 fixed)
RESOLVED
FIXED
mozilla61
Tracking | Status | |
---|---|---|
firefox61 | --- | fixed |
People
(Reporter: ahal, Assigned: ahal)
References
(Blocks 1 open bug)
Details
Attachments
(1 file)
Mozlint itself has pretty good test coverage, but the lint implementations (that live under tools/lint) don't. They do tend to be fairly simple, but there has been a few bugs that could have been caught by tests (or for which we could have added a test).
Let's stand up some basic tests so there's at least a place to expand upon.
Updated•7 years ago
|
Product: Testing → Firefox Build System
Assignee | ||
Updated•7 years ago
|
Assignee: nobody → ahalberstadt
Status: NEW → ASSIGNED
Comment hidden (mozreview-request) |
Comment hidden (mozreview-request) |
Assignee | ||
Comment 3•7 years ago
|
||
Here's pytest's documentation on fixtures in case it helps to understand this review:
https://docs.pytest.org/en/latest/fixture.html
Comment 4•7 years ago
|
||
mozreview-review |
Comment on attachment 8961824 [details]
Bug 1436802 - [lint] Add some tests for the flake8 linter integration
https://reviewboard.mozilla.org/r/230640/#review237580
::: tools/lint/test/test_flake8.py:3
(Diff revision 1)
> +# This Source Code Form is subject to the terms of the Mozilla Public
> +# License, v. 2.0. If a copy of the MPL was not distributed with this
> +# file, You can obtain one at http://mozilla.org/MPL/2.0/.
Nit: I believe that test files should be in the public domain. https://www.mozilla.org/en-US/MPL/license-policy/ indicates that you can use a license header like this:
```
# Any copyright is dedicated to the Public Domain.
# http://creativecommons.org/publicdomain/zero/1.0/
```
(The same probably applies to `tools/lint/test/conftest.py` as well.)
Updated•7 years ago
|
Comment 5•7 years ago
|
||
mozreview-review |
Comment on attachment 8961824 [details]
Bug 1436802 - [lint] Add some tests for the flake8 linter integration
https://reviewboard.mozilla.org/r/230640/#review237888
Attachment #8961824 -
Flags: review?(bpostelnicu) → review+
Assignee | ||
Comment 6•7 years ago
|
||
mozreview-review-reply |
Comment on attachment 8961824 [details]
Bug 1436802 - [lint] Add some tests for the flake8 linter integration
https://reviewboard.mozilla.org/r/230640/#review237580
> Nit: I believe that test files should be in the public domain. https://www.mozilla.org/en-US/MPL/license-policy/ indicates that you can use a license header like this:
>
> ```
> # Any copyright is dedicated to the Public Domain.
> # http://creativecommons.org/publicdomain/zero/1.0/
> ```
>
> (The same probably applies to `tools/lint/test/conftest.py` as well.)
Ah, interesting I hadn't noticed that before! I think almost all of our test code is MPLv2 but might as well start licensing under CC. Looks like by leaving off a license it also defaults to CC, so maybe I'll just do that.
Comment hidden (mozreview-request) |
Pushed by ahalberstadt@mozilla.com:
https://hg.mozilla.org/integration/autoland/rev/ad34ac3d45a6
[lint] Add some tests for the flake8 linter integration r=andi
Comment 9•7 years ago
|
||
bugherder |
Status: ASSIGNED → RESOLVED
Closed: 7 years ago
status-firefox61:
--- → fixed
Resolution: --- → FIXED
Target Milestone: --- → mozilla61
Updated•6 years ago
|
Version: Version 3 → 3 Branch
Updated•5 years ago
|
Version: 3 Branch → unspecified
Updated•2 years ago
|
Product: Firefox Build System → Developer Infrastructure
You need to log in
before you can comment on or make changes to this bug.
Description
•