Skip to content

Commit 1193a91

Browse files
committed
update credits and example
1 parent 4cd9930 commit 1193a91

File tree

1 file changed

+12
-6
lines changed

1 file changed

+12
-6
lines changed

README.md

Lines changed: 12 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -2,8 +2,6 @@
22

33
A library to make parallel selenium tests that automatically download and setup webdrivers
44

5-
This is a WIP
6-
75
## Usage
86

97
### Installation
@@ -17,6 +15,10 @@ pip install autoparaselenium
1715
The API is very simple
1816

1917
```python
18+
from typing import Union
19+
20+
from selenium import webdriver
21+
2022
from autoparaselenium import configure, chrome, firefox, run_on, all_, Extension
2123

2224
# All parameters are optional, but still call it once before everything
@@ -31,18 +33,22 @@ configure(
3133
)
3234

3335
@run_on(all_)
34-
def test_both_firefox_and_chrome(web):
36+
def test_both_firefox_and_chrome(web: Union[webdriver.Firefox, webdriver.Chrome]):
3537
...
3638

3739
@run_on(firefox)
38-
def test_firefox_only(web):
40+
def test_firefox_only(web: webdriver.Firefox):
3941
...
4042

4143
@run_on(chrome)
42-
def test_chrome_only(web):
44+
def test_chrome_only(web: webdriver.Chrome):
4345
...
4446
```
4547

4648
### Running
4749

48-
Use `pytest -n PROC` where `PROC` is the number of parallel threads
50+
Use `pytest --tests-per-worker PROC` where `PROC` is the number of parallel threads
51+
52+
## Credits
53+
54+
* [pytest-parallel python3.9 support fork](https://github.com/andni233/pytest-parallel/tree/python39-support)

0 commit comments

Comments
 (0)