mirror of
https://github.com/onionshare/onionshare.git
synced 2024-10-01 01:35:40 -04:00
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:
parent
201f351279
commit
8fc8e0765c
@ -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
|
||||
|
17
BUILD.md
17
BUILD.md
@ -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
|
||||
```
|
||||
|
@ -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
|
||||
|
@ -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
|
||||
|
11
install/requirements-tests.txt
Normal file
11
install/requirements-tests.txt
Normal 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
|
Loading…
Reference in New Issue
Block a user