Skip to content

Commit 8d24061

Browse files
locsmithJon Wedell
authored and
Jon Wedell
committed
Add information on how to run unit tests to documentation
1 parent e6d24fc commit 8d24061

File tree

2 files changed

+47
-0
lines changed

2 files changed

+47
-0
lines changed

README.rst

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -25,3 +25,12 @@ is to read the documentation at `read the docs <https://pynmrstar.readthedocs.or
2525

2626
.. |Wheel| image:: https://img.shields.io/pypi/wheel/pynmrstar.svg
2727
:target: https://pypi.org/project/PyNMRSTAR
28+
29+
30+
Running the unit tests
31+
----------------------
32+
33+
.. role:: bash(code)
34+
:language: bash
35+
36+
if you with to run the unit tests distributed with PyNMR-Star, please see the readme in :bash:`pynmrstar/unit_tests`

pynmrstar/unit_tests/README.rst

Lines changed: 38 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,38 @@
1+
2+
How to run the unit tests
3+
=========================
4+
5+
6+
Setup
7+
-----
8+
9+
All the following commands should be made from a shell inside the
10+
PyNMRStar distribution folder (PyNMRStar not PyNMRStar/pynmrstar).
11+
12+
Some parts of the unit test structure are in a sub-repo that needs to be
13+
downloaded separately using git.
14+
15+
.. code:: bash
16+
17+
git submodule init
18+
git submodule update
19+
20+
if you have downloaded PyNMR-Star as a git hub repo you may need
21+
22+
.. code:: shell
23+
24+
export PYTHONPATH=<full-path-to-PyNMRStar-folder>
25+
26+
Using unit test
27+
---------------
28+
29+
.. code:: bash
30+
31+
python3 pynmrstar/unit_tests/test_pynmrstar.py
32+
33+
Using pytest
34+
------------
35+
36+
.. code:: bash
37+
38+
pytest pynmrstar/unit_tests

0 commit comments

Comments
 (0)