Skip to content

Commit 50ab7d1

Browse files
committed
Integrate with pytest-metadata instead of directly with pytest-html
1 parent 02eb0d8 commit 50ab7d1

File tree

2 files changed

+7
-2
lines changed

2 files changed

+7
-2
lines changed

CHANGES.rst

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,11 @@
11
Release Notes
22
-------------
33

4+
**1.3.0 (2017-02-27)**
5+
6+
* Add base URL to metadata provided by `pytest-metadata
7+
<https://pypi.python.org/pypi/pytest-metadata/>`_.
8+
49
**1.2.0 (2016-11-17)**
510

611
* Added support for specifying the base URL by environment variable

pytest_base_url/plugin.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -14,8 +14,6 @@ def base_url(request):
1414
config = request.config
1515
base_url = config.getoption('base_url')
1616
if base_url is not None:
17-
if hasattr(config, '_environment'):
18-
config._environment.append(('Base URL', base_url))
1917
return base_url
2018

2119

@@ -38,6 +36,8 @@ def pytest_configure(config):
3836
base_url = config.getoption('base_url') or config.getini('base_url')
3937
if base_url is not None:
4038
config.option.base_url = base_url
39+
if hasattr(config, '_metadata'):
40+
config._metadata['Base URL'] = base_url
4141

4242

4343
def pytest_report_header(config, startdir):

0 commit comments

Comments
 (0)