A testing repository using Python 3.9, Pytest, and Playwright.
- Python 3.9
- Pytest
- Pytest-Asyncio
- Pytest-Playwright
- Playwright
- Flake8
- Black
- Isort
- Pydocstyle
- Pipenv
Converted to Pipenv to remove the dependency on virtualenv and pip. Simply install pipenv (pip install pipenv
), then run pipenv --python 3.9
. This will build a new virtual environment. Run pipenv run shell
to activate the environment. Finally, run pipenv install
to install all dependencies.
It is likely that I will switch this over to Poetry as I have had great experience with the package. In addition, it uses pyproject.toml
instead of Pipfile
or requirements.txt
for dependency management.
Run the following commands:
pytest
- To run all testspytest -m {mark}
To run all tests for a certain mark (located in the pyproject.toml file)pytest --headful
To run all tests in a headful statepytest --browser {browser_choice}
To run all tests in a specific browser (chromium, webkit, or firefox)
Each command can be combined such as pytest -m elements --headful --browser chromium