summaryrefslogtreecommitdiff
path: root/BUILD.md
diff options
context:
space:
mode:
authorMicah Lee <micah@micahflee.com>2020-03-29 13:54:30 -0700
committerMicah Lee <micah@micahflee.com>2020-03-29 13:54:30 -0700
commitc5b8938f1c79a131dab1630e675deb3cc3b5d39e (patch)
treee0609b35c314b52b6c9e95203e4c759f3fd25d3f /BUILD.md
parentaebc96142fec62f20fdb0196a8f6b08018f6acc9 (diff)
downloadonionshare-c5b8938f1c79a131dab1630e675deb3cc3b5d39e.tar.gz
onionshare-c5b8938f1c79a131dab1630e675deb3cc3b5d39e.zip
Update build instructions for how to run tests with poetry
Diffstat (limited to 'BUILD.md')
-rw-r--r--BUILD.md16
1 files changed, 5 insertions, 11 deletions
diff --git a/BUILD.md b/BUILD.md
index 370f73b8..b631d410 100644
--- a/BUILD.md
+++ b/BUILD.md
@@ -264,28 +264,22 @@ This will prompt you to codesign three binaries and execute one unsigned binary.
# Running tests
-OnionShare includes PyTest unit tests. To run the tests, first install some dependencies:
+OnionShare includes PyTest unit tests. To run tests, you can run `pytest` against the `tests/` directory.
```sh
-pip3 install -r install/requirements-tests.txt
-```
-
-Then you can run `pytest` against the `tests/` directory.
-
-```sh
-pytest tests/
+poetry run pytest tests/
```
You can run GUI tests like this:
```sh
-pytest --rungui tests/
+poetry run pytest --rungui tests/
```
If you would like to also run the GUI unit tests in 'tor' mode, start Tor Browser in the background, then run:
```sh
-pytest --rungui --runtor tests/
+poetry run pytest --rungui --runtor tests/
```
Keep in mind that the Tor tests take a lot longer to run than local mode, but they are also more comprehensive.
@@ -293,7 +287,7 @@ Keep in mind that the Tor tests take a lot longer to run than local mode, but th
You can also choose to wrap the tests in `xvfb-run` so that a ton of OnionShare windows don't pop up on your desktop (you may need to install the `xorg-x11-server-Xvfb` package), like this:
```sh
-xvfb-run pytest --rungui tests/
+xvfb-run poetry run pytest --rungui -vvv --no-qt-log tests/
```
# Making releases