Skip to content

Remove pytest _describe #4429

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

Merged
merged 5 commits into from
Oct 31, 2018

Conversation

mashrikt
Copy link
Contributor

This refers to #4270. Removes the pytest_describe blocks with class.
I am told that it is blocked until https://github.com/orgs/rtfd/projects/2 is resolved.

@mashrikt mashrikt force-pushed the pytest_describe_remove branch 2 times, most recently from d84f383 to e0da5e3 Compare July 25, 2018 20:35
@@ -222,15 +222,15 @@ def test_python_pip_install_default():
assert build.pip_install is False


def describe_validate_python_extra_requirements():
class ValidatePythonExtraRequirements:
Copy link
Member

Choose a reason for hiding this comment

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

We need to follow the convention of naming the class starting with Test like TestValidatePythonExtraRequirements and inheritance from object to keep the code python2 compatible.


def it_defaults_to_list():
def it_defaults_to_list(self):
Copy link
Member

Choose a reason for hiding this comment

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

Also in the methods, we need to start the name with test_

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Right! My bad.

Copy link
Member

@stsewd stsewd left a comment

Choose a reason for hiding this comment

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

Thanks for looking at this, we need to follow some conventions when naming the tests classes to pytest be able to discover them.

I think we may want to wait at least https://github.com/rtfd/readthedocs.org/pull/4355/files is merged, that way we avoid a lot of conflicts later.

@mashrikt
Copy link
Contributor Author

@stsewd I have made made the changes.
I understand your point. Happy to rebase and fix when the other PR is merged.

@mashrikt mashrikt force-pushed the pytest_describe_remove branch from 257f906 to 1f5b577 Compare July 26, 2018 18:34
@mashrikt mashrikt force-pushed the pytest_describe_remove branch from 1f5b577 to c07316b Compare August 2, 2018 18:41
@mashrikt
Copy link
Contributor Author

mashrikt commented Aug 2, 2018

https://github.com/rtfd/readthedocs.org/pull/4355/files is merged.
So I have rebased this PR. But checks have failed.
@stsewd

@safwanrahman
Copy link
Member

safwanrahman commented Aug 2, 2018

@mashrikt I have restarted the test!
Update: Test passed!

@agjohnson agjohnson added this to the Refactoring milestone Aug 27, 2018
@stsewd
Copy link
Member

stsewd commented Aug 30, 2018

@mashrikt could you rebase/update the branch?

@mashrikt mashrikt force-pushed the pytest_describe_remove branch from c07316b to 7937c4b Compare August 30, 2018 20:36
@mashrikt
Copy link
Contributor Author

@stsewd Done!


def it_defaults_to_list():
def test_it_defaults_to_list(self):
Copy link
Member

Choose a reason for hiding this comment

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

not sure if we need the it in the tests names anymore, what do you think?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I agree. I was thinking the same.
Should the naming convention be:
i) test_default_to_list or
ii) test_defaults_to_list?

Copy link
Member

Choose a reason for hiding this comment

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

I'm not an english expert, but I guess 2 makes sense.

Copy link
Member

Choose a reason for hiding this comment

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

Yea, 2 is 👍

Copy link
Contributor Author

@mashrikt mashrikt left a comment

Choose a reason for hiding this comment

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

Should the naming convention be:
i) test_default_to_list or
ii) test_defaults_to_list?


def it_defaults_to_list():
def test_it_defaults_to_list(self):
Copy link
Contributor Author

Choose a reason for hiding this comment

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

I agree. I was thinking the same.
Should the naming convention be:
i) test_default_to_list or
ii) test_defaults_to_list?

@ericholscher
Copy link
Member

@stsewd want to give this another look and see if we can get it approved and merged?

@ericholscher
Copy link
Member

As a note, I'm happy to merge it with the current naming, so if everything looks good, we should 👍

@stsewd
Copy link
Member

stsewd commented Oct 31, 2018

@ericholscher yeah, we are good to merge this, codecov bot didn't got triggered here :/

@codecov
Copy link

codecov bot commented Oct 31, 2018

Codecov Report

Merging #4429 into master will not change coverage.
The diff coverage is n/a.

@@           Coverage Diff           @@
##           master    #4429   +/-   ##
=======================================
  Coverage   76.21%   76.21%           
=======================================
  Files         158      158           
  Lines       10019    10019           
  Branches     1265     1265           
=======================================
  Hits         7636     7636           
  Misses       2039     2039           
  Partials      344      344

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants