-
-
Notifications
You must be signed in to change notification settings - Fork 9
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
#12: Add tests for violation codes and docs #711
#12: Add tests for violation codes and docs #711
Conversation
from dotenv_linter.violations.base import BaseFSTViolation, BaseViolation | ||
|
||
|
||
def test_visitor_returns_location() -> None: |
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.
Not sure, what is the purpose of this. Maybe test method as_line()
?
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.
This file can be safely removed, I think
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## master #711 +/- ##
==========================================
- Coverage 97.62% 97.28% -0.34%
==========================================
Files 22 22
Lines 463 479 +16
Branches 74 95 +21
==========================================
+ Hits 452 466 +14
- Misses 8 10 +2
Partials 3 3 ☔ View full report in Codecov by Sentry. |
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.
Thank you!
CHANGELOG.md
Outdated
|
||
### Misc | ||
|
||
- Add tests for violation codes and docstrings |
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.
Tests are our internal stuff, this should not be added to user-facing changelog.
tests/conftest.py
Outdated
@@ -11,6 +14,8 @@ | |||
BaseViolation, | |||
) | |||
|
|||
ALL_VIOLATIONS_TYPE = Dict[ModuleType, List[BaseViolation]] |
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.
ALL_VIOLATIONS_TYPE = Dict[ModuleType, List[BaseViolation]] | |
from typing_extensions import TypeAlias | |
AllViolations: TypeAlias = Dict[ModuleType, List[BaseViolation]] |
from dotenv_linter.violations.base import BaseFSTViolation, BaseViolation | ||
|
||
|
||
def test_visitor_returns_location() -> None: |
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.
This file can be safely removed, I think
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.
Thanks! Just one nitpick left
tests/conftest.py
Outdated
@@ -11,6 +15,8 @@ | |||
BaseViolation, | |||
) | |||
|
|||
ALL_VIOLATIONS_TYPE: TypeAlias = Dict[ModuleType, List[BaseViolation]] |
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.
ALL_VIOLATIONS_TYPE
is a constant.
While AllViolationsType
is a type :)
Please, rename it.
@sobolevn , could you please help with passing the test |
I use But, make sure that |
final set class attribute __final__ only since 3.11. typing_extensions adds this to 3.9 and 3.10 as well
b3c3dc8
to
e37f531
Compare
Hey @sobolevn , PR fails |
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.
Thank you!
I have made things!
Checklist
CHANGELOG.md
Related issues
Closes #12
Based on PR #88