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

Add specific testing instructions to contributing.rst #3074

Closed
wants to merge 8 commits into from
Closed
Show file tree
Hide file tree
Changes from 3 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -130,6 +130,9 @@ venv.bak/
.spyderproject
.spyproject

# PyCharm project settings
.idea

# Rope project settings
.ropeproject

Expand Down
37 changes: 36 additions & 1 deletion docs/dev/contributing.rst
Original file line number Diff line number Diff line change
Expand Up @@ -67,7 +67,7 @@ Steps for Submitting Code
When contributing code, you'll want to follow this checklist:

1. Fork the repository on GitHub.
2. Run the tests to confirm they all pass on your system. If they don't, you'll
2. `Run the tests`_ to confirm they all pass on your system. If they don't, you'll
need to investigate why they fail. If you're unable to diagnose this
yourself, raise it as a bug report by following the guidelines in this
document: :ref:`bug-reports`.
Expand Down Expand Up @@ -120,3 +120,38 @@ hasn't been reported before. Duplicate bug reports are a huge drain on the time
of other contributors, and should be avoided as much as possible.

.. _GitHub issues: https:/pypa/pipenv/issues

Run the tests
-------------

Three ways of running the tests are as follows:

1. ``make test`` (which uses ``docker``)
2. ``./run-tests.sh``
3. Using pipenv::

pipenv install --dev
pipenv run py.test
Copy link
Member

Choose a reason for hiding this comment

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

I believe pytest is recommended over py.test by Pytest folks now. Also you might want to consider Windows for these instructions :) Most of these won’t work on Windows.

Copy link
Author

@jeremycarroll jeremycarroll Oct 24, 2018

Choose a reason for hiding this comment

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

I changed to pytest as suggested.

OTOH, I am not inclined (or able) to also document what is needed for Windows (other than mentioning run-tests.bat). I agree that the example config instructions won't work for most people. They are explicitly an example of what might be required, and I think they will be helpful even for people who have to modify them. I also think more examples from more platforms would be good.


For the last two, it is important that your environment is setup correctly, and
this may take some work, for example, on a specific Mac installation, the following
steps may be needed::

# Make sure the tests can access github
if [ "$SSH_AGENT_PID" = "" ]
then
eval `ssh-agent`
ssh-add
fi

# Use unix like utilities, installed with brew,
# e.g. brew install coreutils
for d in /usr/local/opt/*/libexec/gnubin /usr/local/opt/python/libexec/bin
do
[[ ":$PATH:" != *":$d:"* ]] && PATH="$d:${PATH}"
done

export PATH

# PIP_FIND_LINKS currently breaks test_uninstall.py
unset PIP_FIND_LINKS