Hello community,
here is the log from the commit of package python-pytest-metadata for
openSUSE:Factory checked in at 2019-02-15 10:02:50
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Comparing /work/SRC/openSUSE:Factory/python-pytest-metadata (Old)
and /work/SRC/openSUSE:Factory/.python-pytest-metadata.new.28833 (New)
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Package is "python-pytest-metadata"
Fri Feb 15 10:02:50 2019 rev:2 rq:676058 version:1.8.0
Changes:
--------
---
/work/SRC/openSUSE:Factory/python-pytest-metadata/python-pytest-metadata.changes
2018-11-29 22:58:18.319661333 +0100
+++
/work/SRC/openSUSE:Factory/.python-pytest-metadata.new.28833/python-pytest-metadata.changes
2019-02-15 10:02:54.347616005 +0100
@@ -1,0 +2,6 @@
+Thu Feb 14 14:28:31 UTC 2019 - Tomáš Chvátal <[email protected]>
+
+- Update to 1.8.0:
+ * Add environment variables for Bitbucket pipelines (CI).
+
+-------------------------------------------------------------------
Old:
----
pytest-metadata-1.7.0.tar.gz
New:
----
pytest-metadata-1.8.0.tar.gz
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Other differences:
------------------
++++++ python-pytest-metadata.spec ++++++
--- /var/tmp/diff_new_pack.tDeMMg/_old 2019-02-15 10:02:55.395615667 +0100
+++ /var/tmp/diff_new_pack.tDeMMg/_new 2019-02-15 10:02:55.419615659 +0100
@@ -1,7 +1,7 @@
#
# spec file for package python-pytest-metadata
#
-# Copyright (c) 2018 SUSE LINUX GmbH, Nuernberg, Germany.
+# Copyright (c) 2019 SUSE LINUX GmbH, Nuernberg, Germany.
#
# All modifications and additions to the file contributed by third parties
# remain the property of their copyright owners, unless otherwise agreed
@@ -18,7 +18,7 @@
%{?!python_module:%define python_module() python-%{**} python3-%{**}}
Name: python-pytest-metadata
-Version: 1.7.0
+Version: 1.8.0
Release: 0
Summary: Pytest plugin for test session metadata
License: MPL-2.0
++++++ pytest-metadata-1.7.0.tar.gz -> pytest-metadata-1.8.0.tar.gz ++++++
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/pytest-metadata-1.7.0/.gitignore
new/pytest-metadata-1.8.0/.gitignore
--- old/pytest-metadata-1.7.0/.gitignore 2018-04-05 15:56:35.000000000
+0200
+++ new/pytest-metadata-1.8.0/.gitignore 2019-01-03 02:07:28.000000000
+0100
@@ -8,3 +8,4 @@
.idea
build
dist
+Pipfile.lock
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/pytest-metadata-1.7.0/.pre-commit-config.yaml
new/pytest-metadata-1.8.0/.pre-commit-config.yaml
--- old/pytest-metadata-1.7.0/.pre-commit-config.yaml 1970-01-01
01:00:00.000000000 +0100
+++ new/pytest-metadata-1.8.0/.pre-commit-config.yaml 2019-01-03
02:07:28.000000000 +0100
@@ -0,0 +1,6 @@
+repos:
+- repo: https://github.com/ambv/black
+ rev: stable
+ hooks:
+ - id: black
+ language_version: python3
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/pytest-metadata-1.7.0/.travis.yml
new/pytest-metadata-1.8.0/.travis.yml
--- old/pytest-metadata-1.7.0/.travis.yml 2018-04-05 15:56:35.000000000
+0200
+++ new/pytest-metadata-1.8.0/.travis.yml 2019-01-03 02:07:28.000000000
+0100
@@ -2,7 +2,9 @@
jobs:
include:
- stage:
- python: 3.6
+ python: 3.7
+ dist: xenial
+ sudo: required
env: TOXENV=flake8
- stage:
python: 2.7
@@ -11,13 +13,20 @@
python: 3.6
env: TOXENV=py36
- stage:
+ python: 3.7
+ dist: xenial
+ sudo: required
+ env: TOXENV=py37
+ - stage:
python: pypy
env: TOXENV=pypy
- stage:
python: pypy3
env: TOXENV=pypy3
- stage: deploy
- python: 3.6
+ python: 3.7
+ dist: xenial
+ sudo: required
install: skip
script: skip
deploy:
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/pytest-metadata-1.7.0/CHANGES.rst
new/pytest-metadata-1.8.0/CHANGES.rst
--- old/pytest-metadata-1.7.0/CHANGES.rst 2018-04-05 15:56:35.000000000
+0200
+++ new/pytest-metadata-1.8.0/CHANGES.rst 2019-01-03 02:07:28.000000000
+0100
@@ -1,6 +1,11 @@
Release Notes
-------------
+1.8.0 (2019-01-03)
+------------------
+
+* Add environment variables for Bitbucket pipelines (CI).
+
1.7.0 (2018-04-05)
------------------
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/pytest-metadata-1.7.0/PKG-INFO
new/pytest-metadata-1.8.0/PKG-INFO
--- old/pytest-metadata-1.7.0/PKG-INFO 2018-04-05 15:57:22.000000000 +0200
+++ new/pytest-metadata-1.8.0/PKG-INFO 2019-01-03 02:07:49.000000000 +0100
@@ -1,6 +1,6 @@
Metadata-Version: 1.1
Name: pytest-metadata
-Version: 1.7.0
+Version: 1.8.0
Summary: pytest plugin for test session metadata
Home-page: https://github.com/pytest-dev/pytest-metadata
Author: Dave Hunt
@@ -20,6 +20,8 @@
:alt: PyPI
.. image:: https://img.shields.io/travis/pytest-dev/pytest-metadata.svg
:target: https://travis-ci.org/pytest-dev/pytest-metadata/
+ .. image:: https://img.shields.io/badge/code%20style-black-000000.svg
+ :target: https://github.com/ambv/black
:alt: Travis
.. image::
https://img.shields.io/github/issues-raw/pytest-dev/pytest-metadata.svg
:target: https://github.com/pytest-dev/pytest-metadata/issues
@@ -44,6 +46,28 @@
$ pip install pytest-metadata
+ Development
+ -----------
+
+ To contribute to pytest-metadata it helps to
+ have `Pipenv <https://pipenv.readthedocs.io/en/latest/>`_
+ and `pre-commit <https://pre-commit.com/>`_ installed.
+
+ .. code-block:: bash
+
+ $ pipenv install --dev
+ $ pre-commit install
+
+ Running Tests
+ _____________
+
+ We use `Tox <http://tox.testrun.org/>`_ to manage running tests
+ against the supported Python versions.
+
+ .. code-block:: bash
+
+ $ pipenv run tox
+
Available metadata
------------------
@@ -78,6 +102,7 @@
added to metadata if they're present.
* `AppVeyor <https://www.appveyor.com/docs/environment-variables/>`_
+ * `Bitbucket
<https://confluence.atlassian.com/bitbucket/environment-variables-794502608.html>`_
* `CircleCI <https://circleci.com/docs/1.0/environment-variables/>`_
* `GitLab CI <http://docs.gitlab.com/ce/ci/variables/README.html>`_
* `Jenkins
<https://wiki.jenkins-ci.org/display/JENKINS/Building+a+software+project#Buildingasoftwareproject-JenkinsSetEnvironmentVariables>`_
@@ -104,17 +129,16 @@
Accessing metadata
------------------
- To add/modify/delete metadata at the end of metadata collection, you
can use the `pytest_metadata` hook:
+ To add/modify/delete metadata at the end of metadata collection, you
can use the ``pytest_metadata`` hook:
.. code-block:: python
+
import pytest
@pytest.mark.optionalhook
def pytest_metadata(metadata):
- for key in metadata.keys():
- if "password" in key.lower():
- del metadata[key]
+ metadata.pop("password", None)
- To access the metadata from a test or fixture, you can use the
`metadata`
+ To access the metadata from a test or fixture, you can use the
``metadata``
fixture:
.. code-block:: python
@@ -122,8 +146,8 @@
def test_metadata(metadata):
assert 'metadata' in metadata['Plugins']
- To access the metadata from a plugin, you can use the `_metadata`
attribute of
- the `config` object. This can be used to read/add/modify the metadata:
+ To access the metadata from a plugin, you can use the ``_metadata``
attribute of
+ the ``config`` object. This can be used to read/add/modify the
metadata:
.. code-block:: python
@@ -165,3 +189,4 @@
Classifier: Programming Language :: Python
Classifier: Programming Language :: Python :: 2.7
Classifier: Programming Language :: Python :: 3.6
+Classifier: Programming Language :: Python :: 3.7
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/pytest-metadata-1.7.0/Pipfile
new/pytest-metadata-1.8.0/Pipfile
--- old/pytest-metadata-1.7.0/Pipfile 1970-01-01 01:00:00.000000000 +0100
+++ new/pytest-metadata-1.8.0/Pipfile 2019-01-03 02:07:28.000000000 +0100
@@ -0,0 +1,13 @@
+[[source]]
+url = "https://pypi.org/simple"
+verify_ssl = true
+name = "pypi"
+
+[packages]
+
+[dev-packages]
+black = "*"
+pytest-metadata = {editable = true, path = "."}
+tox = "*"
+
+[requires]
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/pytest-metadata-1.7.0/README.rst
new/pytest-metadata-1.8.0/README.rst
--- old/pytest-metadata-1.7.0/README.rst 2018-04-05 15:56:35.000000000
+0200
+++ new/pytest-metadata-1.8.0/README.rst 2019-01-03 02:07:28.000000000
+0100
@@ -12,6 +12,8 @@
:alt: PyPI
.. image:: https://img.shields.io/travis/pytest-dev/pytest-metadata.svg
:target: https://travis-ci.org/pytest-dev/pytest-metadata/
+.. image:: https://img.shields.io/badge/code%20style-black-000000.svg
+ :target: https://github.com/ambv/black
:alt: Travis
.. image::
https://img.shields.io/github/issues-raw/pytest-dev/pytest-metadata.svg
:target: https://github.com/pytest-dev/pytest-metadata/issues
@@ -36,6 +38,28 @@
$ pip install pytest-metadata
+Development
+-----------
+
+To contribute to pytest-metadata it helps to
+have `Pipenv <https://pipenv.readthedocs.io/en/latest/>`_
+and `pre-commit <https://pre-commit.com/>`_ installed.
+
+.. code-block:: bash
+
+ $ pipenv install --dev
+ $ pre-commit install
+
+Running Tests
+_____________
+
+We use `Tox <http://tox.testrun.org/>`_ to manage running tests
+against the supported Python versions.
+
+.. code-block:: bash
+
+ $ pipenv run tox
+
Available metadata
------------------
@@ -70,6 +94,7 @@
added to metadata if they're present.
* `AppVeyor <https://www.appveyor.com/docs/environment-variables/>`_
+* `Bitbucket
<https://confluence.atlassian.com/bitbucket/environment-variables-794502608.html>`_
* `CircleCI <https://circleci.com/docs/1.0/environment-variables/>`_
* `GitLab CI <http://docs.gitlab.com/ce/ci/variables/README.html>`_
* `Jenkins
<https://wiki.jenkins-ci.org/display/JENKINS/Building+a+software+project#Buildingasoftwareproject-JenkinsSetEnvironmentVariables>`_
@@ -96,17 +121,16 @@
Accessing metadata
------------------
-To add/modify/delete metadata at the end of metadata collection, you can use
the `pytest_metadata` hook:
+To add/modify/delete metadata at the end of metadata collection, you can use
the ``pytest_metadata`` hook:
.. code-block:: python
+
import pytest
@pytest.mark.optionalhook
def pytest_metadata(metadata):
- for key in metadata.keys():
- if "password" in key.lower():
- del metadata[key]
+ metadata.pop("password", None)
-To access the metadata from a test or fixture, you can use the `metadata`
+To access the metadata from a test or fixture, you can use the ``metadata``
fixture:
.. code-block:: python
@@ -114,8 +138,8 @@
def test_metadata(metadata):
assert 'metadata' in metadata['Plugins']
-To access the metadata from a plugin, you can use the `_metadata` attribute of
-the `config` object. This can be used to read/add/modify the metadata:
+To access the metadata from a plugin, you can use the ``_metadata`` attribute
of
+the ``config`` object. This can be used to read/add/modify the metadata:
.. code-block:: python
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/pytest-metadata-1.7.0/pytest_metadata/ci/appveyor.py
new/pytest-metadata-1.8.0/pytest_metadata/ci/appveyor.py
--- old/pytest-metadata-1.7.0/pytest_metadata/ci/appveyor.py 2018-04-05
15:56:35.000000000 +0200
+++ new/pytest-metadata-1.8.0/pytest_metadata/ci/appveyor.py 2019-01-03
02:07:28.000000000 +0100
@@ -3,33 +3,34 @@
# file, You can obtain one at http://mozilla.org/MPL/2.0/.
ENVIRONMENT_VARIABLES = [
- 'APPVEYOR_API_URL',
- 'APPVEYOR_ACCOUNT_NAME',
- 'APPVEYOR_PROJECT_ID',
- 'APPVEYOR_PROJECT_NAME',
- 'APPVEYOR_PROJECT_SLUG',
- 'APPVEYOR_BUILD_FOLDER',
- 'APPVEYOR_BUILD_ID',
- 'APPVEYOR_BUILD_NUMBER',
- 'APPVEYOR_BUILD_VERSION',
- 'APPVEYOR_PULL_REQUEST_NUMBER',
- 'APPVEYOR_PULL_REQUEST_TITLE',
- 'APPVEYOR_JOB_ID',
- 'APPVEYOR_JOB_NAME',
- 'APPVEYOR_REPO_PROVIDER',
- 'APPVEYOR_REPO_SCM',
- 'APPVEYOR_REPO_NAME',
- 'APPVEYOR_REPO_BRANCH',
- 'APPVEYOR_REPO_TAG',
- 'APPVEYOR_REPO_TAG_NAME',
- 'APPVEYOR_REPO_COMMIT',
- 'APPVEYOR_REPO_COMMIT_AUTHOR',
- 'APPVEYOR_REPO_COMMIT_AUTHOR_EMAIL',
- 'APPVEYOR_REPO_COMMIT_TIMESTAMP',
- 'APPVEYOR_REPO_COMMIT_MESSAGE',
- 'APPVEYOR_REPO_COMMIT_MESSAGE_EXTENDED',
- 'APPVEYOR_SCHEDULED_BUILD',
- 'APPVEYOR_FORCED_BUILD',
- 'APPVEYOR_RE_BUILD',
- 'PLATFORM',
- 'CONFIGURATION']
+ "APPVEYOR_API_URL",
+ "APPVEYOR_ACCOUNT_NAME",
+ "APPVEYOR_PROJECT_ID",
+ "APPVEYOR_PROJECT_NAME",
+ "APPVEYOR_PROJECT_SLUG",
+ "APPVEYOR_BUILD_FOLDER",
+ "APPVEYOR_BUILD_ID",
+ "APPVEYOR_BUILD_NUMBER",
+ "APPVEYOR_BUILD_VERSION",
+ "APPVEYOR_PULL_REQUEST_NUMBER",
+ "APPVEYOR_PULL_REQUEST_TITLE",
+ "APPVEYOR_JOB_ID",
+ "APPVEYOR_JOB_NAME",
+ "APPVEYOR_REPO_PROVIDER",
+ "APPVEYOR_REPO_SCM",
+ "APPVEYOR_REPO_NAME",
+ "APPVEYOR_REPO_BRANCH",
+ "APPVEYOR_REPO_TAG",
+ "APPVEYOR_REPO_TAG_NAME",
+ "APPVEYOR_REPO_COMMIT",
+ "APPVEYOR_REPO_COMMIT_AUTHOR",
+ "APPVEYOR_REPO_COMMIT_AUTHOR_EMAIL",
+ "APPVEYOR_REPO_COMMIT_TIMESTAMP",
+ "APPVEYOR_REPO_COMMIT_MESSAGE",
+ "APPVEYOR_REPO_COMMIT_MESSAGE_EXTENDED",
+ "APPVEYOR_SCHEDULED_BUILD",
+ "APPVEYOR_FORCED_BUILD",
+ "APPVEYOR_RE_BUILD",
+ "PLATFORM",
+ "CONFIGURATION",
+]
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore'
old/pytest-metadata-1.7.0/pytest_metadata/ci/bitbucket.py
new/pytest-metadata-1.8.0/pytest_metadata/ci/bitbucket.py
--- old/pytest-metadata-1.7.0/pytest_metadata/ci/bitbucket.py 1970-01-01
01:00:00.000000000 +0100
+++ new/pytest-metadata-1.8.0/pytest_metadata/ci/bitbucket.py 2019-01-03
02:07:28.000000000 +0100
@@ -0,0 +1,19 @@
+# This Source Code Form is subject to the terms of the Mozilla Public
+# License, v. 2.0. If a copy of the MPL was not distributed with this
+# file, You can obtain one at http://mozilla.org/MPL/2.0/.
+
+ENVIRONMENT_VARIABLES = [
+ "CI",
+ "BITBUCKET_BUILD_NUMBER",
+ "BITBUCKET_CLONE_DIR",
+ "BITBUCKET_COMMIT",
+ "BITBUCKET_REPO_OWNER",
+ "BITBUCKET_REPO_OWNER_UUID",
+ "BITBUCKET_REPO_SLUG",
+ "BITBUCKET_REPO_UUID",
+ "BITBUCKET_BRANCH",
+ "BITBUCKET_TAG",
+ "BITBUCKET_BOOKMARK",
+ "BITBUCKET_PARALLEL_STEP",
+ "BITBUCKET_PARALLEL_STEP_COUNT",
+]
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/pytest-metadata-1.7.0/pytest_metadata/ci/circleci.py
new/pytest-metadata-1.8.0/pytest_metadata/ci/circleci.py
--- old/pytest-metadata-1.7.0/pytest_metadata/ci/circleci.py 2018-04-05
15:56:35.000000000 +0200
+++ new/pytest-metadata-1.8.0/pytest_metadata/ci/circleci.py 2019-01-03
02:07:28.000000000 +0100
@@ -3,24 +3,25 @@
# file, You can obtain one at http://mozilla.org/MPL/2.0/.
ENVIRONMENT_VARIABLES = [
- 'CIRCLE_PROJECT_USERNAME',
- 'CIRCLE_PROJECT_REPONAME',
- 'CIRCLE_BRANCH',
- 'CIRCLE_TAG',
- 'CIRCLE_SHA1',
- 'CIRCLE_REPOSITORY_URL',
- 'CIRCLE_COMPARE_URL',
- 'CIRCLE_BUILD_URL',
- 'CIRCLE_BUILD_NUM',
- 'CIRCLE_PREVIOUS_BUILD_NUM',
- 'CI_PULL_REQUESTS',
- 'CI_PULL_REQUEST',
- 'CIRCLE_ARTIFACTS',
- 'CIRCLE_USERNAME',
- 'CIRCLE_TEST_REPORTS',
- 'CIRCLE_PR_USERNAME',
- 'CIRCLE_PR_REPONAME',
- 'CIRCLE_PR_NUMBER',
- 'CIRCLE_NODE_TOTAL',
- 'CIRCLE_NODE_INDEX',
- 'CIRCLE_BUILD_IMAGE']
+ "CIRCLE_PROJECT_USERNAME",
+ "CIRCLE_PROJECT_REPONAME",
+ "CIRCLE_BRANCH",
+ "CIRCLE_TAG",
+ "CIRCLE_SHA1",
+ "CIRCLE_REPOSITORY_URL",
+ "CIRCLE_COMPARE_URL",
+ "CIRCLE_BUILD_URL",
+ "CIRCLE_BUILD_NUM",
+ "CIRCLE_PREVIOUS_BUILD_NUM",
+ "CI_PULL_REQUESTS",
+ "CI_PULL_REQUEST",
+ "CIRCLE_ARTIFACTS",
+ "CIRCLE_USERNAME",
+ "CIRCLE_TEST_REPORTS",
+ "CIRCLE_PR_USERNAME",
+ "CIRCLE_PR_REPONAME",
+ "CIRCLE_PR_NUMBER",
+ "CIRCLE_NODE_TOTAL",
+ "CIRCLE_NODE_INDEX",
+ "CIRCLE_BUILD_IMAGE",
+]
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore'
old/pytest-metadata-1.7.0/pytest_metadata/ci/gitlab_ci.py
new/pytest-metadata-1.8.0/pytest_metadata/ci/gitlab_ci.py
--- old/pytest-metadata-1.7.0/pytest_metadata/ci/gitlab_ci.py 2018-04-05
15:56:35.000000000 +0200
+++ new/pytest-metadata-1.8.0/pytest_metadata/ci/gitlab_ci.py 2019-01-03
02:07:28.000000000 +0100
@@ -3,42 +3,43 @@
# file, You can obtain one at http://mozilla.org/MPL/2.0/.
ENVIRONMENT_VARIABLES = [
- 'CI',
- 'CI_COMMIT_REF_NAME',
- 'CI_COMMIT_REF_SLUG',
- 'CI_COMMIT_SHA',
- 'CI_COMMIT_TAG',
- 'CI_DEBUG_TRACE',
- 'CI_ENVIRONMENT_NAME',
- 'CI_ENVIRONMENT_SLUG',
- 'CI_JOB_ID',
- 'CI_JOB_MANUAL',
- 'CI_JOB_NAME',
- 'CI_JOB_STAGE',
- 'CI_JOB_TOKEN',
- 'CI_REPOSITORY_URL',
- 'CI_RUNNER_DESCRIPTION',
- 'CI_RUNNER_ID',
- 'CI_RUNNER_TAGS',
- 'CI_PIPELINE_ID',
- 'CI_PIPELINE_TRIGGERED',
- 'CI_PROJECT_DIR',
- 'CI_PROJECT_ID',
- 'CI_PROJECT_NAME',
- 'CI_PROJECT_NAMESPACE',
- 'CI_PROJECT_PATH',
- 'CI_PROJECT_URL',
- 'CI_REGISTRY',
- 'CI_REGISTRY_IMAGE',
- 'CI_REGISTRY_PASSWORD',
- 'CI_REGISTRY_USER',
- 'CI_SERVER',
- 'CI_SERVER_NAME',
- 'CI_SERVER_REVISION',
- 'CI_SERVER_VERSION',
- 'ARTIFACT_DOWNLOAD_ATTEMPTS',
- 'GET_SOURCES_ATTEMPTS',
- 'GITLAB_CI',
- 'GITLAB_USER_ID',
- 'GITLAB_USER_EMAIL',
- 'RESTORE_CACHE_ATTEMPTS']
+ "CI",
+ "CI_COMMIT_REF_NAME",
+ "CI_COMMIT_REF_SLUG",
+ "CI_COMMIT_SHA",
+ "CI_COMMIT_TAG",
+ "CI_DEBUG_TRACE",
+ "CI_ENVIRONMENT_NAME",
+ "CI_ENVIRONMENT_SLUG",
+ "CI_JOB_ID",
+ "CI_JOB_MANUAL",
+ "CI_JOB_NAME",
+ "CI_JOB_STAGE",
+ "CI_JOB_TOKEN",
+ "CI_REPOSITORY_URL",
+ "CI_RUNNER_DESCRIPTION",
+ "CI_RUNNER_ID",
+ "CI_RUNNER_TAGS",
+ "CI_PIPELINE_ID",
+ "CI_PIPELINE_TRIGGERED",
+ "CI_PROJECT_DIR",
+ "CI_PROJECT_ID",
+ "CI_PROJECT_NAME",
+ "CI_PROJECT_NAMESPACE",
+ "CI_PROJECT_PATH",
+ "CI_PROJECT_URL",
+ "CI_REGISTRY",
+ "CI_REGISTRY_IMAGE",
+ "CI_REGISTRY_PASSWORD",
+ "CI_REGISTRY_USER",
+ "CI_SERVER",
+ "CI_SERVER_NAME",
+ "CI_SERVER_REVISION",
+ "CI_SERVER_VERSION",
+ "ARTIFACT_DOWNLOAD_ATTEMPTS",
+ "GET_SOURCES_ATTEMPTS",
+ "GITLAB_CI",
+ "GITLAB_USER_ID",
+ "GITLAB_USER_EMAIL",
+ "RESTORE_CACHE_ATTEMPTS",
+]
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/pytest-metadata-1.7.0/pytest_metadata/ci/jenkins.py
new/pytest-metadata-1.8.0/pytest_metadata/ci/jenkins.py
--- old/pytest-metadata-1.7.0/pytest_metadata/ci/jenkins.py 2018-04-05
15:56:35.000000000 +0200
+++ new/pytest-metadata-1.8.0/pytest_metadata/ci/jenkins.py 2019-01-03
02:07:28.000000000 +0100
@@ -3,18 +3,19 @@
# file, You can obtain one at http://mozilla.org/MPL/2.0/.
ENVIRONMENT_VARIABLES = [
- 'BUILD_NUMBER',
- 'BUILD_ID',
- 'BUILD_URL',
- 'NODE_NAME',
- 'JOB_NAME',
- 'BUILD_TAG',
- 'EXECUTOR_NUMBER',
- 'JENKINS_URL',
- 'JAVA_HOME',
- 'WORKSPACE',
- 'SVN_REVISION',
- 'CVS_BRANCH',
- 'GIT_COMMIT',
- 'GIT_URL',
- 'GIT_BRANCH']
+ "BUILD_NUMBER",
+ "BUILD_ID",
+ "BUILD_URL",
+ "NODE_NAME",
+ "JOB_NAME",
+ "BUILD_TAG",
+ "EXECUTOR_NUMBER",
+ "JENKINS_URL",
+ "JAVA_HOME",
+ "WORKSPACE",
+ "SVN_REVISION",
+ "CVS_BRANCH",
+ "GIT_COMMIT",
+ "GIT_URL",
+ "GIT_BRANCH",
+]
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore'
old/pytest-metadata-1.7.0/pytest_metadata/ci/taskcluster.py
new/pytest-metadata-1.8.0/pytest_metadata/ci/taskcluster.py
--- old/pytest-metadata-1.7.0/pytest_metadata/ci/taskcluster.py 2018-04-05
15:56:35.000000000 +0200
+++ new/pytest-metadata-1.8.0/pytest_metadata/ci/taskcluster.py 2019-01-03
02:07:28.000000000 +0100
@@ -2,6 +2,4 @@
# License, v. 2.0. If a copy of the MPL was not distributed with this
# file, You can obtain one at http://mozilla.org/MPL/2.0/.
-ENVIRONMENT_VARIABLES = [
- 'TASK_ID',
- 'RUN_ID']
+ENVIRONMENT_VARIABLES = ["TASK_ID", "RUN_ID"]
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore'
old/pytest-metadata-1.7.0/pytest_metadata/ci/travis_ci.py
new/pytest-metadata-1.8.0/pytest_metadata/ci/travis_ci.py
--- old/pytest-metadata-1.7.0/pytest_metadata/ci/travis_ci.py 2018-04-05
15:56:35.000000000 +0200
+++ new/pytest-metadata-1.8.0/pytest_metadata/ci/travis_ci.py 2019-01-03
02:07:28.000000000 +0100
@@ -3,20 +3,21 @@
# file, You can obtain one at http://mozilla.org/MPL/2.0/.
ENVIRONMENT_VARIABLES = [
- 'TRAVIS_BRANCH',
- 'TRAVIS_BUILD_ID',
- 'TRAVIS_BUILD_NUMBER',
- 'TRAVIS_COMMIT',
- 'TRAVIS_COMMIT_MESSAGE',
- 'TRAVIS_COMMIT_RANGE',
- 'TRAVIS_EVENT_TYPE',
- 'TRAVIS_JOB_ID',
- 'TRAVIS_JOB_NUMBER',
- 'TRAVIS_OS_NAME',
- 'TRAVIS_PULL_REQUEST',
- 'TRAVIS_PULL_REQUEST_BRANCH',
- 'TRAVIS_PULL_REQUEST_SHA',
- 'TRAVIS_PULL_REQUEST_SLUG',
- 'TRAVIS_REPO_SLUG',
- 'TRAVIS_SUDO',
- 'TRAVIS_TAG']
+ "TRAVIS_BRANCH",
+ "TRAVIS_BUILD_ID",
+ "TRAVIS_BUILD_NUMBER",
+ "TRAVIS_COMMIT",
+ "TRAVIS_COMMIT_MESSAGE",
+ "TRAVIS_COMMIT_RANGE",
+ "TRAVIS_EVENT_TYPE",
+ "TRAVIS_JOB_ID",
+ "TRAVIS_JOB_NUMBER",
+ "TRAVIS_OS_NAME",
+ "TRAVIS_PULL_REQUEST",
+ "TRAVIS_PULL_REQUEST_BRANCH",
+ "TRAVIS_PULL_REQUEST_SHA",
+ "TRAVIS_PULL_REQUEST_SLUG",
+ "TRAVIS_REPO_SLUG",
+ "TRAVIS_SUDO",
+ "TRAVIS_TAG",
+]
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/pytest-metadata-1.7.0/pytest_metadata/plugin.py
new/pytest-metadata-1.8.0/pytest_metadata/plugin.py
--- old/pytest-metadata-1.7.0/pytest_metadata/plugin.py 2018-04-05
15:56:35.000000000 +0200
+++ new/pytest-metadata-1.8.0/pytest_metadata/plugin.py 2019-01-03
02:07:28.000000000 +0100
@@ -13,77 +13,92 @@
import py
from pytest_metadata.ci import (
- appveyor, circleci, gitlab_ci, jenkins, taskcluster, travis_ci)
-
-
-CONTINUOUS_INTEGRATION = {
- 'AppVeyor': ['APPVEYOR', appveyor.ENVIRONMENT_VARIABLES],
- 'CircleCI': ['CIRCLECI', circleci.ENVIRONMENT_VARIABLES],
- 'GitLab CI': ['GITLAB_CI', gitlab_ci.ENVIRONMENT_VARIABLES],
- 'Jenkins': ['JENKINS_URL', jenkins.ENVIRONMENT_VARIABLES],
- 'TaskCluster': ['TASK_ID', taskcluster.ENVIRONMENT_VARIABLES],
- 'Travis CI': ['TRAVIS', travis_ci.ENVIRONMENT_VARIABLES]}
+ appveyor,
+ bitbucket,
+ circleci,
+ gitlab_ci,
+ jenkins,
+ taskcluster,
+ travis_ci,
+)
+
+CONTINUOUS_INTEGRATION = [
+ appveyor.ENVIRONMENT_VARIABLES,
+ bitbucket.ENVIRONMENT_VARIABLES,
+ circleci.ENVIRONMENT_VARIABLES,
+ gitlab_ci.ENVIRONMENT_VARIABLES,
+ jenkins.ENVIRONMENT_VARIABLES,
+ taskcluster.ENVIRONMENT_VARIABLES,
+ travis_ci.ENVIRONMENT_VARIABLES,
+]
def pytest_addhooks(pluginmanager):
from . import hooks
+
pluginmanager.add_hookspecs(hooks)
[email protected](scope='session')
[email protected](scope="session")
def metadata(pytestconfig):
"""Provide test session metadata"""
return pytestconfig._metadata
def pytest_addoption(parser):
- parser.addoption('--metadata',
- action='append',
- default=[],
- dest='metadata',
- metavar=('key', 'value'),
- nargs=2,
- help='additional metadata.')
+ parser.addoption(
+ "--metadata",
+ action="append",
+ default=[],
+ dest="metadata",
+ metavar=("key", "value"),
+ nargs=2,
+ help="additional metadata.",
+ )
@pytest.hookimpl(tryfirst=True)
def pytest_configure(config):
config._metadata = {
- 'Python': platform.python_version(),
- 'Platform': platform.platform(),
- 'Packages': {
- 'pytest': pytest.__version__,
- 'py': py.__version__,
- 'pluggy': pluggy.__version__}}
- config._metadata.update({
- k: v for k, v in config.getoption('metadata')})
+ "Python": platform.python_version(),
+ "Platform": platform.platform(),
+ "Packages": {
+ "pytest": pytest.__version__,
+ "py": py.__version__,
+ "pluggy": pluggy.__version__,
+ },
+ }
+ config._metadata.update({k: v for k, v in config.getoption("metadata")})
plugins = dict()
for plugin, dist in config.pluginmanager.list_plugin_distinfo():
name, version = dist.project_name, dist.version
- if name.startswith('pytest-'):
+ if name.startswith("pytest-"):
name = name[7:]
plugins[name] = version
- config._metadata['Plugins'] = plugins
+ config._metadata["Plugins"] = plugins
- for key, value in CONTINUOUS_INTEGRATION.items():
- [config._metadata.update({v: os.environ.get(v)})
- for v in value[1] if os.environ.get(v)]
+ for provider in CONTINUOUS_INTEGRATION:
+ [
+ config._metadata.update({var: os.environ.get(var)})
+ for var in provider
+ if os.environ.get(var)
+ ]
- if hasattr(config, 'slaveoutput'):
- config.slaveoutput['metadata'] = config._metadata
+ if hasattr(config, "slaveoutput"):
+ config.slaveoutput["metadata"] = config._metadata
config.hook.pytest_metadata(metadata=config._metadata)
def pytest_report_header(config):
- if config.getoption('verbose') > 0:
- return 'metadata: {0}'.format(config._metadata)
+ if config.getoption("verbose") > 0:
+ return "metadata: {0}".format(config._metadata)
@pytest.mark.optionalhook
def pytest_testnodedown(node):
# note that any metadata from remote slaves will be replaced with the
# environment from the final slave to quit
- if hasattr(node, 'slaveoutput'):
- node.config._metadata.update(node.slaveoutput['metadata'])
+ if hasattr(node, "slaveoutput"):
+ node.config._metadata.update(node.slaveoutput["metadata"])
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore'
old/pytest-metadata-1.7.0/pytest_metadata.egg-info/PKG-INFO
new/pytest-metadata-1.8.0/pytest_metadata.egg-info/PKG-INFO
--- old/pytest-metadata-1.7.0/pytest_metadata.egg-info/PKG-INFO 2018-04-05
15:57:21.000000000 +0200
+++ new/pytest-metadata-1.8.0/pytest_metadata.egg-info/PKG-INFO 2019-01-03
02:07:49.000000000 +0100
@@ -1,6 +1,6 @@
Metadata-Version: 1.1
Name: pytest-metadata
-Version: 1.7.0
+Version: 1.8.0
Summary: pytest plugin for test session metadata
Home-page: https://github.com/pytest-dev/pytest-metadata
Author: Dave Hunt
@@ -20,6 +20,8 @@
:alt: PyPI
.. image:: https://img.shields.io/travis/pytest-dev/pytest-metadata.svg
:target: https://travis-ci.org/pytest-dev/pytest-metadata/
+ .. image:: https://img.shields.io/badge/code%20style-black-000000.svg
+ :target: https://github.com/ambv/black
:alt: Travis
.. image::
https://img.shields.io/github/issues-raw/pytest-dev/pytest-metadata.svg
:target: https://github.com/pytest-dev/pytest-metadata/issues
@@ -44,6 +46,28 @@
$ pip install pytest-metadata
+ Development
+ -----------
+
+ To contribute to pytest-metadata it helps to
+ have `Pipenv <https://pipenv.readthedocs.io/en/latest/>`_
+ and `pre-commit <https://pre-commit.com/>`_ installed.
+
+ .. code-block:: bash
+
+ $ pipenv install --dev
+ $ pre-commit install
+
+ Running Tests
+ _____________
+
+ We use `Tox <http://tox.testrun.org/>`_ to manage running tests
+ against the supported Python versions.
+
+ .. code-block:: bash
+
+ $ pipenv run tox
+
Available metadata
------------------
@@ -78,6 +102,7 @@
added to metadata if they're present.
* `AppVeyor <https://www.appveyor.com/docs/environment-variables/>`_
+ * `Bitbucket
<https://confluence.atlassian.com/bitbucket/environment-variables-794502608.html>`_
* `CircleCI <https://circleci.com/docs/1.0/environment-variables/>`_
* `GitLab CI <http://docs.gitlab.com/ce/ci/variables/README.html>`_
* `Jenkins
<https://wiki.jenkins-ci.org/display/JENKINS/Building+a+software+project#Buildingasoftwareproject-JenkinsSetEnvironmentVariables>`_
@@ -104,17 +129,16 @@
Accessing metadata
------------------
- To add/modify/delete metadata at the end of metadata collection, you
can use the `pytest_metadata` hook:
+ To add/modify/delete metadata at the end of metadata collection, you
can use the ``pytest_metadata`` hook:
.. code-block:: python
+
import pytest
@pytest.mark.optionalhook
def pytest_metadata(metadata):
- for key in metadata.keys():
- if "password" in key.lower():
- del metadata[key]
+ metadata.pop("password", None)
- To access the metadata from a test or fixture, you can use the
`metadata`
+ To access the metadata from a test or fixture, you can use the
``metadata``
fixture:
.. code-block:: python
@@ -122,8 +146,8 @@
def test_metadata(metadata):
assert 'metadata' in metadata['Plugins']
- To access the metadata from a plugin, you can use the `_metadata`
attribute of
- the `config` object. This can be used to read/add/modify the metadata:
+ To access the metadata from a plugin, you can use the ``_metadata``
attribute of
+ the ``config`` object. This can be used to read/add/modify the
metadata:
.. code-block:: python
@@ -165,3 +189,4 @@
Classifier: Programming Language :: Python
Classifier: Programming Language :: Python :: 2.7
Classifier: Programming Language :: Python :: 3.6
+Classifier: Programming Language :: Python :: 3.7
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore'
old/pytest-metadata-1.7.0/pytest_metadata.egg-info/SOURCES.txt
new/pytest-metadata-1.8.0/pytest_metadata.egg-info/SOURCES.txt
--- old/pytest-metadata-1.7.0/pytest_metadata.egg-info/SOURCES.txt
2018-04-05 15:57:22.000000000 +0200
+++ new/pytest-metadata-1.8.0/pytest_metadata.egg-info/SOURCES.txt
2019-01-03 02:07:49.000000000 +0100
@@ -1,7 +1,9 @@
.gitignore
+.pre-commit-config.yaml
.travis.yml
CHANGES.rst
LICENSE
+Pipfile
README.rst
setup.cfg
setup.py
@@ -17,6 +19,7 @@
pytest_metadata.egg-info/top_level.txt
pytest_metadata/ci/__init__.py
pytest_metadata/ci/appveyor.py
+pytest_metadata/ci/bitbucket.py
pytest_metadata/ci/circleci.py
pytest_metadata/ci/gitlab_ci.py
pytest_metadata/ci/jenkins.py
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/pytest-metadata-1.7.0/setup.py
new/pytest-metadata-1.8.0/setup.py
--- old/pytest-metadata-1.7.0/setup.py 2018-04-05 15:56:35.000000000 +0200
+++ new/pytest-metadata-1.8.0/setup.py 2019-01-03 02:07:28.000000000 +0100
@@ -1,31 +1,33 @@
from setuptools import setup
-setup(name='pytest-metadata',
- use_scm_version=True,
- description='pytest plugin for test session metadata',
- long_description=open('README.rst').read(),
- author='Dave Hunt',
- author_email='[email protected]',
- url='https://github.com/pytest-dev/pytest-metadata',
- packages=[
- 'pytest_metadata',
- 'pytest_metadata.ci'],
- entry_points={'pytest11': ['metadata = pytest_metadata.plugin']},
- setup_requires=['setuptools_scm'],
- install_requires=['pytest>=2.9.0'],
- license='Mozilla Public License 2.0 (MPL 2.0)',
- keywords='py.test pytest metadata',
- classifiers=[
- 'Development Status :: 5 - Production/Stable',
- 'Framework :: Pytest',
- 'Intended Audience :: Developers',
- 'License :: OSI Approved :: Mozilla Public License 2.0 (MPL 2.0)',
- 'Operating System :: POSIX',
- 'Operating System :: Microsoft :: Windows',
- 'Operating System :: MacOS :: MacOS X',
- 'Topic :: Software Development :: Quality Assurance',
- 'Topic :: Software Development :: Testing',
- 'Topic :: Utilities',
- 'Programming Language :: Python',
- 'Programming Language :: Python :: 2.7',
- 'Programming Language :: Python :: 3.6'])
+setup(
+ name="pytest-metadata",
+ use_scm_version=True,
+ description="pytest plugin for test session metadata",
+ long_description=open("README.rst").read(),
+ author="Dave Hunt",
+ author_email="[email protected]",
+ url="https://github.com/pytest-dev/pytest-metadata",
+ packages=["pytest_metadata", "pytest_metadata.ci"],
+ entry_points={"pytest11": ["metadata = pytest_metadata.plugin"]},
+ setup_requires=["setuptools_scm"],
+ install_requires=["pytest>=2.9.0"],
+ license="Mozilla Public License 2.0 (MPL 2.0)",
+ keywords="py.test pytest metadata",
+ classifiers=[
+ "Development Status :: 5 - Production/Stable",
+ "Framework :: Pytest",
+ "Intended Audience :: Developers",
+ "License :: OSI Approved :: Mozilla Public License 2.0 (MPL 2.0)",
+ "Operating System :: POSIX",
+ "Operating System :: Microsoft :: Windows",
+ "Operating System :: MacOS :: MacOS X",
+ "Topic :: Software Development :: Quality Assurance",
+ "Topic :: Software Development :: Testing",
+ "Topic :: Utilities",
+ "Programming Language :: Python",
+ "Programming Language :: Python :: 2.7",
+ "Programming Language :: Python :: 3.6",
+ "Programming Language :: Python :: 3.7",
+ ],
+)
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/pytest-metadata-1.7.0/tests/test_metadata.py
new/pytest-metadata-1.8.0/tests/test_metadata.py
--- old/pytest-metadata-1.7.0/tests/test_metadata.py 2018-04-05
15:56:35.000000000 +0200
+++ new/pytest-metadata-1.8.0/tests/test_metadata.py 2019-01-03
02:07:28.000000000 +0100
@@ -2,61 +2,69 @@
# License, v. 2.0. If a copy of the MPL was not distributed with this
# file, You can obtain one at http://mozilla.org/MPL/2.0/.
-pytest_plugins = "pytester",
+pytest_plugins = ("pytester",)
def test_metadata(testdir):
- testdir.makepyfile("""
+ testdir.makepyfile(
+ """
def test_pass(metadata):
for k in ['Python', 'Platform', 'Packages']:
assert k in metadata
assert 'JENKINS_URL' not in metadata
- """)
+ """
+ )
result = testdir.runpytest()
assert result.ret == 0
def test_environment_variables(testdir, monkeypatch):
- monkeypatch.setenv('JENKINS_URL', 'foo')
- monkeypatch.setenv('GIT_COMMIT', 'bar')
- testdir.makepyfile("""
+ monkeypatch.setenv("JENKINS_URL", "foo")
+ monkeypatch.setenv("GIT_COMMIT", "bar")
+ testdir.makepyfile(
+ """
def test_pass(metadata):
assert metadata.get('JENKINS_URL') == 'foo'
assert metadata.get('GIT_COMMIT') == 'bar'
- """)
+ """
+ )
result = testdir.runpytest()
assert result.ret == 0
def test_additional_metadata(testdir):
- testdir.makepyfile("""
+ testdir.makepyfile(
+ """
def test_pass(metadata):
assert metadata.get('Dave') == 'Hunt'
assert metadata.get('Jim') == 'Bob'
- """)
- result = testdir.runpytest('--metadata', 'Dave', 'Hunt',
- '--metadata', 'Jim', 'Bob')
+ """
+ )
+ result = testdir.runpytest("--metadata", "Dave", "Hunt", "--metadata",
"Jim", "Bob")
assert result.ret == 0
def test_metadata_hook(testdir):
- testdir.makeconftest("""
+ testdir.makeconftest(
+ """
import pytest
@pytest.mark.optionalhook
def pytest_metadata(metadata):
metadata['Dave'] = 'Hunt'
- """)
- testdir.makepyfile("""
+ """
+ )
+ testdir.makepyfile(
+ """
def test_pass(metadata):
assert metadata.get('Dave') == 'Hunt'
- """)
+ """
+ )
result = testdir.runpytest()
assert result.ret == 0
def test_report_header(testdir):
result = testdir.runpytest()
- assert not any(line.startswith('metadata:') for line in
- result.stdout.lines)
- result = testdir.runpytest('-v')
- assert any(line.startswith('metadata:') for line in result.stdout.lines)
+ assert not any(line.startswith("metadata:") for line in
result.stdout.lines)
+ result = testdir.runpytest("-v")
+ assert any(line.startswith("metadata:") for line in result.stdout.lines)
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/pytest-metadata-1.7.0/tox.ini
new/pytest-metadata-1.8.0/tox.ini
--- old/pytest-metadata-1.7.0/tox.ini 2018-04-05 15:56:35.000000000 +0200
+++ new/pytest-metadata-1.8.0/tox.ini 2019-01-03 02:07:28.000000000 +0100
@@ -1,5 +1,5 @@
[tox]
-envlist = py{27,36,py,py3}, flake8
+envlist = py{27,36,37,py,py3}, flake8
[testenv]
commands = pytest -v -r a {posargs}
@@ -8,3 +8,6 @@
skip_install = true
deps = flake8
commands = flake8 {posargs:.}
+
+[flake8]
+max-line-length = 88