Skip to content

Commit a58318e

Browse files
authored
Merge pull request #372 from ashimaathri/update-readme-with-testing
Update README with instructions for testing
2 parents ccb842d + 4c4f2f4 commit a58318e

File tree

4 files changed

+17
-5
lines changed

4 files changed

+17
-5
lines changed

.gitignore

+2-2
Original file line numberDiff line numberDiff line change
@@ -33,6 +33,8 @@ tmp*
3333
_build/
3434
.cache
3535
*.swp
36+
.tox
37+
env
3638

3739
example/idp3/htdocs/login.mako
3840

@@ -192,8 +194,6 @@ example/sp-repoze/old_sp.xml
192194

193195
example/sp-repoze/sp_conf_2.Pygmalion
194196

195-
.gitignore.swp
196-
197197
example/sp-repoze/sp_conf_2.py
198198

199199
sp.xml

README.rst

+12
Original file line numberDiff line numberDiff line change
@@ -26,3 +26,15 @@ necessary pieces for building a SAML2 service provider or an identity provider.
2626
The distribution contains examples of both.
2727
Originally written to work in a WSGI environment there are extensions that
2828
allow you to use it with other frameworks.
29+
30+
Testing
31+
=======
32+
PySAML2 uses the `pytest <http://doc.pytest.org/en/latest/>`_ framework for
33+
testing. To run the tests on your system's version of python
34+
35+
1. Create and activate a `virtualenv <https://virtualenv.pypa.io/en/stable/>`_.
36+
2. Inside the virtualenv, install the dependencies needed for testing :code:`pip install -r tests/test_requirements.txt`
37+
3. Run the tests :code:`py.test tests`
38+
39+
To run tests in multiple python environments, you can use
40+
`pyenv <https://github.com/yyuu/pyenv>`_ with `tox <https://tox.readthedocs.io/en/latest/>`_.

tests/test_requirements.txt

+2-1
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
1+
mock==2.0.0
12
pymongo==3.0.1
3+
pytest==3.0.3
24
responses==0.5.0
3-
mock

tox.ini

+1-2
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,5 @@
22
envlist = py27,py34
33

44
[testenv]
5-
deps = pytest
6-
-rtests/test_requirements.txt
5+
deps = -rtests/test_requirements.txt
76
commands = py.test tests/

0 commit comments

Comments
 (0)