Skip to content
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

Update tests to use pytest better #1775

Merged
merged 7 commits into from Mar 15, 2020
Merged

Conversation

hmaarrfk
Copy link
Contributor

Needs: #1774

Which has been folded into this.

@djhoese
Copy link
Member

djhoese commented Nov 30, 2019

Thanks for looking in to this. It looks like numpydoc is still needed by some tests to look at docstrings. Could we use flake8-docstring for this?

@djhoese
Copy link
Member

djhoese commented Nov 30, 2019

What do you think about removing the run_tests_in_object function which is used when pytest is not imported (lower in the _testing.py module I think)?

@hmaarrfk
Copy link
Contributor Author

What do you think about removing the run_tests_in_object function which is used when pytest is not imported (lower in the _testing.py module I think)?

depends on how much you want to review

Why is numpydoc simply not a test dependency?

appveyor.yml Outdated
PIP_DEPENDENCIES: "numpydoc https://files.pythonhosted.org/packages/71/5f/07aad120ca6e4339a5c127631341787bc6bc74add39a1f41223bda949721/freetype_py-2.1.0.post1-py2.py3-none-win_amd64.whl"
- PYTHON_VERSION: "3.7"
CONDA_DEPENDENCIES: "numpy scipy setuptools nose pytest coverage pytest-cov pytest-sugar pytest-faulthandler cython coveralls"
CONDA_DEPENDENCIES: "numpy scipy setuptools pytest coverage pytest-cov pytest-sugar pytest-faulthandler cython coveralls"
PIP_DEPENDENCIES: "numpydoc https://files.pythonhosted.org/packages/71/5f/07aad120ca6e4339a5c127631341787bc6bc74add39a1f41223bda949721/freetype_py-2.1.0.post1-py2.py3-none-win_amd64.whl"
Copy link
Contributor Author

Choose a reason for hiding this comment

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

Why do you need this numpydoc dependency?

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 see, you needed bleeding edge at one point. Seems like both freetype-py and numpydoc got released on conda-forge as you required.

.travis.yml Outdated Show resolved Hide resolved
@hmaarrfk
Copy link
Contributor Author

now that you have embraced the wild wild west of conda-forge, you should be able to fully test everything on conda soon: conda-forge/staged-recipes#10342

@djhoese
Copy link
Member

djhoese commented Nov 30, 2019

you should be able to fully test everything on conda soon

You mean, no pip installs? At first I thought you meant run vispy tests on the conda-forge builds.

Why is numpydoc simply not a test dependency?

Just missed dependencies.

depends on how much you want to review

I assumed it would be a small change along with the other import changes you did. Since pytest is required I thought it made sense and was going to do it myself, but since you're already changing this I thought I'd ask.

Thanks again.

@djhoese
Copy link
Member

djhoese commented Nov 30, 2019

The other thing about numpydoc is that for rendering the sphinx docs we could probably just use napolean that now comes with sphinx.

@djhoese
Copy link
Member

djhoese commented Nov 30, 2019

Apparently flake8-docstring is much more strict that numpydoc. If you install flake8-docstrings and run the normal flake checks:

python -m make test flake | wc -l
6315

# Conflicts:
#	.travis.yml
#	appveyor.yml
#	azure-pipelines.yml
#	vispy/testing/_runners.py
#	vispy/testing/_testing.py
#	vispy/util/fonts/tests/test_font.py
@djhoese djhoese changed the title Actually use pytest Update tests to use pytest better Mar 15, 2020
@djhoese djhoese self-assigned this Mar 15, 2020
@djhoese djhoese added the build label Mar 15, 2020
@djhoese
Copy link
Member

djhoese commented Mar 15, 2020

A lot of this was handled similarly in another PR by @larsoner, but there were some things in here I didn't want to lose. The stuff discussed here as alternative solutions (flake8-docstrings, napolean, etc), we can handle in another PR.

Thanks!

@djhoese djhoese merged commit 3ac28ff into vispy:master Mar 15, 2020
@hmaarrfk hmaarrfk deleted the actually_use_pytest branch March 16, 2020 05:11
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants