Rename test dir to tests. Rename unit_tests to tests_gui_local. Add test dependencies. Update various paths. Add GUI unit tests docs to BUILD.md

This commit is contained in:
Miguel Jacq 2018-09-27 15:54:46 +10:00
parent 201f351279
commit 8fc8e0765c
No known key found for this signature in database
GPG Key ID: EEA4341C6D97A0B6
24 changed files with 29 additions and 5 deletions

View File

@ -16,6 +16,6 @@ before_script:
# exit-zero treats all errors as warnings. The GitHub editor is 127 chars wide
- flake8 . --count --exit-zero --max-complexity=10 --max-line-length=127 --statistics
# command to run tests
script: pytest --cov=onionshare test/
script: pytest --cov=onionshare tests/
after_success:
- coveralls

View File

@ -137,8 +137,21 @@ This will prompt you to codesign three binaries and execute one unsigned binary.
## Tests
OnionShare includes PyTest unit tests. To run the tests:
OnionShare includes PyTest unit tests. To run the tests, first install some dependencies:
```sh
pytest test/
pip3 install -r install/requirements-tests.txt
```
If you'd like to run the CLI-based tests that Travis runs:
```sh
pytest tests/
```
If you would like to run the GUI unit tests in 'local only mode':
```sh
cd tests_gui_local/
./run_unit_tests.sh
```

View File

@ -10,4 +10,4 @@ include install/onionshare.desktop
include install/onionshare.appdata.xml
include install/onionshare80.xpm
include install/scripts/onionshare-nautilus.py
include test/*.py
include tests/*.py

View File

@ -59,7 +59,7 @@ def main():
files_in(dir, 'onionshare_gui/share_mode') + \
files_in(dir, 'onionshare_gui/receive_mode') + \
files_in(dir, 'install/scripts') + \
files_in(dir, 'test')
files_in(dir, 'tests')
pysrc = [p for p in src if p.endswith('.py')]
lang_code = args.lang_code

View File

@ -0,0 +1,11 @@
atomicwrites==1.2.1
attrs==18.2.0
more-itertools==4.3.0
pluggy==0.6.0
py==1.6.0
pytest==3.4.2
pytest-faulthandler==1.5.0
pytest-ordering==0.5
pytest-qt==3.1.0
six==1.11.0
urllib3==1.23