Skip to content
This repository has been archived by the owner on Nov 3, 2023. It is now read-only.

Adding tests for parsing one line functions/ Fixing parser bug. #499

Merged
merged 11 commits into from
Sep 5, 2020

Conversation

theyuvalraz
Copy link
Contributor

No description provided.

The tests look valid but don't pass.

from debugging looks like the parser cant find the decorator, although it has no problem finding the function and accepting it as valid.
@samj1912 samj1912 self-requested a review August 23, 2020 11:48
src/tests/parser_test.py Show resolved Hide resolved
pass


@ignored_decorator
Copy link
Member

@samj1912 samj1912 Sep 2, 2020

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can you please add a test case next to this one with a single line definition similar to this one that doesn't have an ignored decorator and raises errors and another one that has a single line definition with a docstring that doesn't raise any errors(again with a non ignored decorator) to check that everything is working as expected in this context?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Good idea :)
Are the tests I added meet the criteria?

1. oneliner_with_decorator_expecting_errors(): The decorator is not ignored, expecting the D400, D415 errors.
2. valid_oneliner_with_decorator(): A valid one line function that shouldn't produce any errors.
1. oneliner_with_decorator_expecting_errors(): The decorator is not ignored, expecting the D400, D415 errors.
2. valid_oneliner_with_decorator(): A valid one line function that shouldn't produce any errors.
Copy link
Member

@samj1912 samj1912 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

lgtm, thanks for the PR!

@samj1912 samj1912 merged commit d85735e into PyCQA:master Sep 5, 2020
@theyuvalraz theyuvalraz deleted the test-ignore-decorators branch September 5, 2020 20:26
@samj1912
Copy link
Member

@theyuvalraz I see that we forgot to update the release notes for this PR. Can you please add a separate PR that updates them and references this one?

theyuvalraz added a commit to theyuvalraz/pydocstyle that referenced this pull request Sep 14, 2020
theyuvalraz added a commit to theyuvalraz/pydocstyle that referenced this pull request Sep 14, 2020
theyuvalraz added a commit to theyuvalraz/pydocstyle that referenced this pull request Sep 14, 2020
theyuvalraz added a commit to theyuvalraz/pydocstyle that referenced this pull request Sep 18, 2020
theyuvalraz added a commit to theyuvalraz/pydocstyle that referenced this pull request Sep 18, 2020
samj1912 pushed a commit that referenced this pull request Sep 19, 2020
* update release notes for #499

* update release notes for #499
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants