Skip to content

Pytest update (Use pytest >= 4.6.2) #331

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 5 commits into from
Jun 11, 2019
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
30 changes: 20 additions & 10 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -12,9 +12,25 @@ pytest my_first_test.py --demo_mode

## <img src="https://cdn2.hubspot.net/hubfs/100006/images/super_square_logo_3a.png" title="SeleniumBase" height="32"> Quick Start:

(<i>Requires **[Python/Pip](https://github.com/seleniumbase/SeleniumBase/blob/master/help_docs/install_python_pip_git.md)** [<img src="https://img.shields.io/badge/python-2.7,_3.5,_3.6,_3.7-22AADD.svg" alt="Python versions" />](https://www.python.org/downloads/). Optionally, you may want to use a [Python virtual environment](https://github.com/seleniumbase/SeleniumBase/blob/master/help_docs/virtualenv_instructions.md) to isolate Python dependencies between projects.</i>)
You'll need **[Python](https://www.python.org/downloads/)** [<img src="https://img.shields.io/badge/python-2.7,_3.5,_3.6,_3.7-22AADD.svg" alt="Python versions" />](https://www.python.org/downloads/)

### <img src="https://cdn2.hubspot.net/hubfs/100006/images/super_square_logo_3a.png" title="SeleniumBase" height="32"> Git clone and install SeleniumBase:
Optionally, you may want a [Python virtual environment](https://github.com/seleniumbase/SeleniumBase/blob/master/help_docs/virtualenv_instructions.md) to isolate Python dependencies between projects.

### <img src="https://cdn2.hubspot.net/hubfs/100006/images/super_square_logo_3a.png" title="SeleniumBase" height="32"> Install/upgrade ``pip``:

With Python installed and on your System PATH, you can get the latest ``pip`` with:
```
python -m easy_install -U pip
```

### <img src="https://cdn2.hubspot.net/hubfs/100006/images/super_square_logo_3a.png" title="SeleniumBase" height="32"> Install ``seleniumbase``: [<img src="https://img.shields.io/badge/pypi-seleniumbase-22AAEE.svg" alt="pypi" />](https://pypi.python.org/pypi/seleniumbase)
```
pip install seleniumbase
```
* Add ``--upgrade`` to upgrade an existing installation.
* Add ``--force-reinstall`` for a clean install.

You can also install SeleniumBase from a ``git clone``:
```
git clone https://github.com/seleniumbase/SeleniumBase.git
cd SeleniumBase
Expand All @@ -23,12 +39,6 @@ python setup.py develop
```
* ("``pip install -e .``" also works from the top-level SeleniumBase folder.)

SeleniumBase can also be installed from [PyPI](https://pypi.python.org/pypi/seleniumbase): [<img src="https://img.shields.io/badge/pypi-seleniumbase-22AAEE.svg" alt="pypi" />](https://pypi.python.org/pypi/seleniumbase)
```
pip install seleniumbase
```
* (Add ``--upgrade`` to get the latest packages. Add ``--force-reinstall`` with ``--no-cache-dir`` to force a clean installation.)

You can also install a specific GitHub branch of SeleniumBase:
```
pip install git+https://github.com/seleniumbase/SeleniumBase.git@master#egg=seleniumbase
Expand Down Expand Up @@ -68,8 +78,8 @@ self.update_text("textarea", "text")
```
(<i>You can still use ``self.driver`` in your code.</i>)

#### **Run tests with Pytest or Nose in any browser:**<br />
(<i>Using **Pytest** is strongly recommended</i>)
#### **Run tests with ``pytest`` or ``nose`` in any browser:**<br />
(<i>Using **pytest** is strongly recommended</i>)
```
pytest my_first_test.py --browser=chrome

Expand Down
19 changes: 9 additions & 10 deletions help_docs/install_python_pip_git.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,22 +8,21 @@ You can [download Git from here](http://git-scm.com/downloads).

(You can also download SeleniumBase from GitHub without using git-related commands.)

### [Python 2.7 or 3.x](https://www.python.org/downloads/)
### [Python 2.7 or 3.x](https://www.python.org)

#### macOS:

Python should already come preinstalled. You can use both Python 2.7 or Python 3.6+ with SeleniumBase. If you have [Homebrew](https://brew.sh/) installed, you can use: ``brew install python3`` to install Python 3. Or you can just get everything from [https://www.python.org/downloads/](https://www.python.org/downloads/).

The official docs.python-guide.org instructions here: [Installing Python 2 on Mac OS X](https://docs.python-guide.org/starting/install/osx/) and [Installing Python 3 on Mac OS X](https://docs.python-guide.org/starting/install3/osx/#install3-osx). (NOTE: Apple has rebranded OS X as macOS but this has not been reflected in the official docs.python-guide.org instructions yet.)

#### Windows:

You can [download Python 2.7 from here](https://www.python.org/downloads/release/python-2713/) OR [download Python 3.6.6 from here](https://www.python.org/downloads/release/python-366/).
You can download Python from [https://www.python.org/downloads/](https://www.python.org/downloads/) if it's not already preinstalled on your machine.

### [Pip](https://en.wikipedia.org/wiki/Pip_%28package_manager%29)

You might already have pip and setuptools installed, but if you don't:

```bash
python -m easy_install -U pip
pip install -U setuptools
```

If that didn't work, here are some more commands you can try:

On macOS / Windows / Linux, run the following command:
```bash
python -m ensurepip --default-pip
Expand Down
2 changes: 1 addition & 1 deletion install.bat
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
@ECHO OFF
python -m pip install --upgrade pip
python -m easy_install --upgrade pip
pip install -e . --upgrade --no-cache-dir --progress-bar off
seleniumbase install chromedriver
seleniumbase install geckodriver
2 changes: 1 addition & 1 deletion install.sh
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
#!/usr/bin/env bash
python -m pip install --upgrade pip
python -m easy_install --upgrade pip
pip install -e . --upgrade --no-cache-dir --progress-bar off
seleniumbase install chromedriver
seleniumbase install geckodriver
2 changes: 1 addition & 1 deletion requirements.txt
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ urllib3==1.25.3
requests>=2.22.0
selenium==3.141.0
pluggy>=0.12.0
pytest>=4.5.0
pytest>=4.6.2
pytest-cov>=2.7.1
pytest-forked>=1.0.2
pytest-html>=1.20.0
Expand Down
8 changes: 4 additions & 4 deletions setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@

setup(
name='seleniumbase',
version='1.23.12',
version='1.23.13',
description='Reliable Browser Automation & Testing Framework',
long_description=long_description,
long_description_content_type='text/markdown',
Expand Down Expand Up @@ -51,8 +51,8 @@
"Programming Language :: Python :: 3.7",
],
install_requires=[
'pip>=19.1.1',
'setuptools>=41.0.1',
'pip',
'setuptools',
'six',
'nose',
'ipdb',
Expand All @@ -63,7 +63,7 @@
'requests>=2.22.0',
'selenium==3.141.0',
'pluggy>=0.12.0',
'pytest>=4.5.0',
'pytest>=4.6.2',
'pytest-cov>=2.7.1',
'pytest-forked>=1.0.2',
'pytest-html>=1.20.0',
Expand Down