You are here: Home / LBN / Up2date / CI/CD / BastionLinux 36 / python3-pytest-base-url-2.1.0-1.lbn36.noarch

python3-pytest-base-url-2.1.0-1.lbn36.noarch

Package Attributes
RPM  python3-pytest-base-url-2.1.0-1.lbn36.noarch.rpm Architecture  noarch Size  12451 Created  2024/04/02 10:53:47 UTC
Package Specification
Summary pytest plugin for URL based testing
Group Unspecified
License ZPL
Home Page https://pypi.org/project/pytest-base-url
Description

pytest-base-url is a simple plugin for pytest that provides an optional base URL via the command line or configuration file.

Requirements You will need the following prerequisites in order to use pytest-base-url:

Python 3.8+ or PyPy3

Installation To install pytest-base-url: $ pip install pytest-base-url

Contributing We welcome contributions. To learn more, see Development

Specifying a Base URL Rather than repeating or abstracting a base URL in your tests, pytest-base-url provides a base_url fixture that returns the specified base URL. import urllib2

def test_example(base_url): assert 200 == urllib2.urlopen(base_url).getcode()

Using the Command Line You can specify the base URL on the command line: $ pytest --base-url http:/www.example.com

Using a Configuration File You can specify the base URL using a configuration file: [pytest] base_url = http:/www.example.com

Using an Environment Variable You can specify the base URL by setting the PYTEST_BASE_URL environment var

Requires
rpmlib(PayloadFilesHavePrefix)  
rpmlib(FileDigests)  
rpmlib(PartialHardlinkSets)  
rpmlib(CompressedFileNames)  
rpmlib(PayloadIsZstd)  
Provides
python-pytest-base-url
python3-pytest-base-url
python3.10-pytest-base-url
python3.10dist(pytest-base-url)
python3dist(pytest-base-url)
Obsoletes
python-pytest-base-url

Document Actions