Skip to content

Commit f98e0a8

Browse files
authored
run with tox on travis (appium#290)
* run with tox on travis * update readme
1 parent ff6a670 commit f98e0a8

7 files changed

Lines changed: 41 additions & 2 deletions

File tree

.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -21,3 +21,4 @@ __pycache__
2121

2222
# Virtual Environments
2323
venv*
24+
.tox

.travis.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ python:
99
- "3.7"
1010

1111
install:
12-
- pip install -r ci-requirements.txt
12+
- pip install tox-travis
1313

1414
script:
15-
- ./ci.sh
15+
- tox

README.md

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -50,6 +50,14 @@ download and unarchive the source tarball (Appium-Python-Client-X.X.tar.gz).
5050

5151
## Run tests
5252

53+
You can run all of tests running on CI via `tox` in your local.
54+
55+
```
56+
$ tox
57+
```
58+
59+
You also can run particular tests like below.
60+
5361
### Unit
5462
5563
```

ci-requirements.txt

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,3 +5,5 @@ pylint==1.9.3
55
autopep8==1.4.3
66
httpretty==0.9.6
77
pytest-cov==2.6.0
8+
tox==3.6.0
9+
tox-travis==0.11

script/__init__.py

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
#!/usr/bin/env python
2+
3+
# Licensed under the Apache License, Version 2.0 (the "License");
4+
# you may not use this file except in compliance with the License.
5+
# You may obtain a copy of the License at
6+
#
7+
# http://www.apache.org/licenses/LICENSE-2.0
8+
#
9+
# Unless required by applicable law or agreed to in writing, software
10+
# distributed under the License is distributed on an "AS IS" BASIS,
11+
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12+
# See the License for the specific language governing permissions and
13+
# limitations under the License.

test/unit/webdriver/device/lock_test.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -42,6 +42,7 @@ def test_lock_no_args(self):
4242
)
4343
driver.lock()
4444
d = json.loads(httpretty.last_request().body.decode('utf-8'))
45+
4546
assert len(d.keys()) == 1
4647
assert d['sessionId'] == '1234567890'
4748

tox.ini

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
[tox]
2+
skipsdist = True
3+
envlist =
4+
py27,
5+
py34,
6+
py35,
7+
py36,
8+
py37
9+
10+
[testenv]
11+
deps =
12+
-r ci-requirements.txt
13+
commands =
14+
./ci.sh

0 commit comments

Comments
 (0)