Merge remote-tracking branch 'origin/minor-change-to-docs-on-running-unit-tests'

This commit is contained in:
vrde 2016-04-13 10:47:03 +02:00
commit 59ae6a230e
No known key found for this signature in database
GPG Key ID: 6581C7C39B3D397D

View File

@ -2,30 +2,22 @@
Once you've installed BigchainDB Server, you may want to run all the unit tests. This section explains how. Once you've installed BigchainDB Server, you may want to run all the unit tests. This section explains how.
First of all, if you installed BigchainDB Server using `pip` (i.e. by getting the package from PyPI), then you didn't install the tests. Before you can run all the unit tests, you must [install BigchainDB from source](installing-server.html#how-to-install-bigchaindb-from-source). First of all, if you installed BigchainDB Server using `pip` (i.e. by getting the package from PyPI), then you didn't install the tests. **Before you can run all the unit tests, you must [install BigchainDB from source](installing-server.html#how-to-install-bigchaindb-from-source).**
To run all the unit tests, first make sure you have RethinkDB running: To run all the unit tests, first make sure you have RethinkDB running:
```text ```text
$ rethinkdb $ rethinkdb
``` ```
then in another terminal, do: then in another terminal, do:
```text
$ py.test -v
```
If the above command doesn't work (e.g. maybe you are running in a conda virtual environment), try:
```text
$ python -m pytest -v
```
(We write our unit tests using the [pytest](http://pytest.org/latest/) framework.)
You can also run all unit tests via `setup.py`, using:
```text ```text
$ python setup.py test $ python setup.py test
``` ```
(Aside: How does the above command work? The documentation for [pytest-runner](https://pypi.python.org/pypi/pytest-runner) explains. We use [pytest](http://pytest.org/latest/) to write all unit tests.)
### Using docker-compose to Run the Tests ### Using docker-compose to Run the Tests
You can also use `docker-compose` to run the unit tests. (You don't have to start RethinkDB first: `docker-compose` does that on its own, when it reads the `docker-compose.yml` file.) You can also use `docker-compose` to run the unit tests. (You don't have to start RethinkDB first: `docker-compose` does that on its own, when it reads the `docker-compose.yml` file.)