Skip to content

Commit

Permalink
fix bug
Browse files Browse the repository at this point in the history
  • Loading branch information
fnngj committed Jul 16, 2019
1 parent b94dc25 commit 0e06d5d
Show file tree
Hide file tree
Showing 4 changed files with 9 additions and 3 deletions.
4 changes: 4 additions & 0 deletions .idea/encodings.xml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 1 addition & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@
```shell
$ pip install -r requirements.txt
```
注:安装```requirements.txt```指定依赖库的版本,这是经过测试的,有时候新的版本可会有错。

#### 配置:

Expand Down
2 changes: 1 addition & 1 deletion requirements.txt
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
selenium==3.141.0
pytest==5.0.1
pytest-html==1.21.1
pytest-html==1.20.0
pytest-rerunfailures==7.0
click==6.7
poium==0.3.6
5 changes: 3 additions & 2 deletions test_dir/test_parametrize.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,8 @@
from time import sleep
import pytest
from os.path import dirname, abspath
sys.path.insert(0, dirname(dirname(abspath(__file__))))
base_path = dirname(dirname(abspath(__file__)))
sys.path.insert(0, base_path)
from page.baidu_page import BaiduPage


Expand All @@ -18,7 +19,7 @@ def get_data(file_path):

@pytest.mark.parametrize(
"name, search_key",
get_data("./data/data_file.json")
get_data(base_path + "/test_dir/data/data_file.json")
)
def test_baidu_search(name, search_key, browser, base_url):
page = BaiduPage(browser)
Expand Down

0 comments on commit 0e06d5d

Please sign in to comment.