Skip to content

Update README with instructions for testing #372

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 3 commits into from
Oct 26, 2016
Merged
Show file tree
Hide file tree
Changes from all 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
4 changes: 2 additions & 2 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,8 @@ tmp*
_build/
.cache
*.swp
.tox
env

example/idp3/htdocs/login.mako

Expand Down Expand Up @@ -192,8 +194,6 @@ example/sp-repoze/old_sp.xml

example/sp-repoze/sp_conf_2.Pygmalion

.gitignore.swp

example/sp-repoze/sp_conf_2.py

sp.xml
Expand Down
12 changes: 12 additions & 0 deletions README.rst
Original file line number Diff line number Diff line change
Expand Up @@ -26,3 +26,15 @@ necessary pieces for building a SAML2 service provider or an identity provider.
The distribution contains examples of both.
Originally written to work in a WSGI environment there are extensions that
allow you to use it with other frameworks.

Testing
=======
PySAML2 uses the `pytest <http://doc.pytest.org/en/latest/>`_ framework for
testing. To run the tests on your system's version of python

1. Create and activate a `virtualenv <https://virtualenv.pypa.io/en/stable/>`_.
2. Inside the virtualenv, install the dependencies needed for testing :code:`pip install -r tests/test_requirements.txt`
3. Run the tests :code:`py.test tests`

To run tests in multiple python environments, you can use
`pyenv <https://github.com/yyuu/pyenv>`_ with `tox <https://tox.readthedocs.io/en/latest/>`_.
3 changes: 2 additions & 1 deletion tests/test_requirements.txt
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
mock==2.0.0
pymongo==3.0.1
pytest==3.0.3
responses==0.5.0
mock
3 changes: 1 addition & 2 deletions tox.ini
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,5 @@
envlist = py27,py34

[testenv]
deps = pytest
-rtests/test_requirements.txt
deps = -rtests/test_requirements.txt
commands = py.test tests/