Hello community,
here is the log from the commit of package python-pytest-runner for
openSUSE:Factory checked in at 2017-03-09 01:46:47
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Comparing /work/SRC/openSUSE:Factory/python-pytest-runner (Old)
and /work/SRC/openSUSE:Factory/.python-pytest-runner.new (New)
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Package is "python-pytest-runner"
Thu Mar 9 01:46:47 2017 rev:8 rq:477290 version:2.11.1
Changes:
--------
---
/work/SRC/openSUSE:Factory/python-pytest-runner/python-pytest-runner.changes
2016-09-05 21:18:36.000000000 +0200
+++
/work/SRC/openSUSE:Factory/.python-pytest-runner.new/python-pytest-runner.changes
2017-03-09 01:46:48.428177201 +0100
@@ -1,0 +2,31 @@
+Fri Mar 3 17:36:54 UTC 2017 - [email protected]
+
+- fix requirements for broken python-setuptools_scm
+
+-------------------------------------------------------------------
+Thu Mar 2 15:18:00 UTC 2017 - [email protected]
+
+- Fix python_module macro
+- Fix Source url
+
+-------------------------------------------------------------------
+Mon Feb 27 18:55:20 UTC 2017 - [email protected]
+
+- Fix macro usage.
+
+-------------------------------------------------------------------
+Sat Feb 25 02:09:42 UTC 2017 - [email protected]
+
+-switch to single-spec version.
+- update to version 2.11.1:
+ * #28: Fix logic in marker evaluation.- changes from version 2.11:
+ * #27: Improved wording in the README around configuration for the
+ distutils command and pytest proper.
+- changes from version 2.10.1:
+ * #21: Avoid mutating dictionary keys during iteration.
+- changes from version 2.10:
+ * #20: Leverage technique in setuptools 794 to populate PYTHONPATH
+ during test runs such that Python subprocesses will have a
+ dependency context comparable to the test runner.
+
+-------------------------------------------------------------------
Old:
----
pytest-runner-2.9.tar.gz
New:
----
pytest-runner-2.11.1.tar.gz
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Other differences:
------------------
++++++ python-pytest-runner.spec ++++++
--- /var/tmp/diff_new_pack.DJGL2F/_old 2017-03-09 01:46:49.140076401 +0100
+++ /var/tmp/diff_new_pack.DJGL2F/_new 2017-03-09 01:46:49.140076401 +0100
@@ -1,7 +1,7 @@
#
# spec file for package python-pytest-runner
#
-# Copyright (c) 2016 SUSE LINUX GmbH, Nuernberg, Germany.
+# Copyright (c) 2017 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
@@ -15,25 +15,26 @@
# Please submit bugfixes or comments via http://bugs.opensuse.org/
#
-
+%{?!python_module:%define python_module() python-%{**} python3-%{**}}
Name: python-pytest-runner
-Version: 2.9
+Version: 2.11.1
Release: 0
Summary: Simple powerful testing with Python
License: MIT
Group: Development/Languages/Python
Url: http://pytest.org
-Source:
https://pypi.io/packages/source/p/pytest-runner/pytest-runner-%{version}.tar.gz
-BuildRequires: python-devel
-BuildRequires: python-pytest >= 2.8
-BuildRequires: python-setuptools
-BuildRequires: python-setuptools_scm >= 1.9
+Source:
https://files.pythonhosted.org/packages/source/p/pytest-runner/pytest-runner-%{version}.tar.gz
+BuildRequires: python-rpm-macros
+BuildRequires: %{python_module devel}
+BuildRequires: %{python_module pytest >= 2.8}
+BuildRequires: %{python_module setuptools}
+BuildRequires: %{python_module setuptools_scm >= 1.9}
+Requires: python-pytest >= 2.8
+Requires: python-setuptools_scm >= 1.9
BuildRoot: %{_tmppath}/%{name}-%{version}-build
-%if 0%{?suse_version} && 0%{?suse_version} <= 1110
-%{!?python_sitelib: %global python_sitelib %(python -c "from
distutils.sysconfig import get_python_lib; print get_python_lib()")}
-%else
BuildArch: noarch
-%endif
+
+%python_subpackages
%description
Invoke py.test as distutils command with dependency resolution.
@@ -42,12 +43,12 @@
%setup -q -n pytest-runner-%{version}
%build
-python setup.py build
+%python_build
%install
-python setup.py install --prefix=%{_prefix} --root=%{buildroot}
+%python_install
-%files
+%files %python_files
%defattr(-,root,root,-)
%doc README.rst CHANGES.rst LICENSE docs/*
%{python_sitelib}/*
++++++ pytest-runner-2.9.tar.gz -> pytest-runner-2.11.1.tar.gz ++++++
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/pytest-runner-2.9/.hgignore
new/pytest-runner-2.11.1/.hgignore
--- old/pytest-runner-2.9/.hgignore 2016-07-14 21:57:54.000000000 +0200
+++ new/pytest-runner-2.11.1/.hgignore 1970-01-01 01:00:00.000000000 +0100
@@ -1,2 +0,0 @@
-build
-dist
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/pytest-runner-2.9/.hgtags
new/pytest-runner-2.11.1/.hgtags
--- old/pytest-runner-2.9/.hgtags 2016-07-14 21:57:54.000000000 +0200
+++ new/pytest-runner-2.11.1/.hgtags 1970-01-01 01:00:00.000000000 +0100
@@ -1,25 +0,0 @@
-a41b62bd27ddab9ce0dda1f586a91eaed1d6a28c 1.0a1
-329b93ea52567ef21c0e96bc78c7dce1d1091607 1.0a2
-9c26b0f31e3033de73e81d84c3140ad22c4c6e14 1.0b1
-b66744dba81a3d674d83420d56d7abfcd132f32a 1.0b2
-fc47a169b30fddce2e37259cf9f853b3fc58cf83 1.0
-5073ad862016aed2c9bd01c06105d505139f754a 1.1b1
-1a37e4e32c68807b5a84ce96244ac285336d0bff 1.1
-fff2c07f64587d73505cdcac4880ecd652f8b308 1.2
-2759a927af554bf3dc7a8feb79353b88bb3eec97 2.0
-339be8b7dc911dd3cd3e2095d7fe1de47fb6c956 2.1
-b4e3fd6cf0e3559f71dcecbf321dbc92723f3df5 2.1.1
-ad7ce5b4257c47bbfc6ff49271ef3a675deb156a 2.1.2
-b0c0ff130ab962a5eea998c91b077296952e4465 2.2
-cc63a4576386eaade57b16590fe7c0053f4533c2 2.2.1
-b71c2b4ed8f735500eabe3fabc5048a36a6a3420 2.3
-4d109575243f51425d03baa8c4bce8c989e87fec 2.4
-ae4193e3172955d2a4cd00208e1f392b6c3c1148 2.5
-fe07ae9c3f076ebf3b716e9951de5492314159df 2.5.1
-0304f39b40f791b81da8a14aed6e8910f798af14 2.6
-cce8431d8b4d9441740a723c7c700d810a4662f8 2.6.1
-0cc61470c2a2fd5b0ed2c4c4ac7480bf68526f6e 2.6.2
-daf0974a5e9348b8c8e20e9ee227702edc5b6e75 2.6.3
-a1fa887922d237f915ba51f9022f4da983ceb32e 2.7
-21cfa346c8960f29f1a364d97ecbb9d1a7f6a3c0 2.7.1
-955536a145d5db5e4a2c23bf52fd575fbc595196 2.8
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/pytest-runner-2.9/.travis.yml
new/pytest-runner-2.11.1/.travis.yml
--- old/pytest-runner-2.9/.travis.yml 2016-07-14 21:57:54.000000000 +0200
+++ new/pytest-runner-2.11.1/.travis.yml 2017-02-08 23:01:52.000000000
+0100
@@ -2,20 +2,24 @@
language: python
python:
- 2.7
-- 3.5
+- 3.6
+- nightly
+install:
+- pip install tox "setuptools>=28.2"
script:
-- pip install -U pytest
-- python setup.py test
+- tox
branches:
except:
- skeleton
deploy:
provider: pypi
+ server: https://upload.pypi.org/legacy/
on:
tags: true
all_branches: true
- python: 3.5
+ python: 3.6
user: jaraco
- distributions: release
+ distributions: dists
+ skip_upload_docs: true
password:
secure:
lZfYQx0ZrCf2FJ+348etKWfzTySB3BZYGd0ce5RFHN2BppcdkONyJfTs4rgdrFEn/WtOaKV3SkJYR09xvlr+4kbLibg7fXhueqZt0ZkhRBnoDE4SxCjICyFCmisG6O3zkrVosizch70/0MqseNanhgXOPhd5llCfQHIqLsa145BG4hM5kxAHPO3Rz2/HCObOTPe4HKj93RAK7lPIMZVN6omcWoG6ZB0QqK+i3LTUtmJ3gE6q/iHk3VF9cJs8xtn3hdo++Lhrboa2NIqf6fl8oxR1C24Wh8vBQ69uTNjmVnDFYMulTs5475jjgDBXPPgVz3CAqYAy/PI+NPw59ebK8MzlaMRK/h/xSrdhxW6K3WbBL71Dn2UGuejXHFC3IuCI832xwkuEupOcGLWz4r2uBnhbgXF63vZ2gYPqrCGHxvDpbtllTVyEeebP8BnFzZttxSn9rbhTP1O9Dn/9tRko8WskyXIR+/2JOA9KP5uT47yeHoFBBUS0GB1XdkGhBrJfQx2LhfHuI6bpzosMiMfJrVNZEg8k0I9XA0uwxDgZrdqKGMKBR6233MXiJg8NyUPRInCRGth4rufcq6kn+wsT9RvuSt9XOhGiYLwChjvHexUXrLGBgupu0Y80Oqcp3YkDG3WHUX++Z2zJSQovrb4BMdKS6Y4usQ8Df5SklIpMCf0=
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/pytest-runner-2.9/CHANGES.rst
new/pytest-runner-2.11.1/CHANGES.rst
--- old/pytest-runner-2.9/CHANGES.rst 2016-07-14 21:57:54.000000000 +0200
+++ new/pytest-runner-2.11.1/CHANGES.rst 2017-02-08 23:01:52.000000000
+0100
@@ -1,3 +1,28 @@
+2.11.1
+~~~~~~
+
+* #28: Fix logic in marker evaluation.
+
+2.11
+~~~~
+
+* #27: Improved wording in the README around configuration
+ for the distutils command and pytest proper.
+
+2.10.1
+~~~~~~
+
+* #21: Avoid mutating dictionary keys during iteration.
+
+2.10
+~~~~
+
+* #20: Leverage technique in `setuptools 794
+ <https://github.com/pypa/setuptools/issues/794>`_
+ to populate PYTHONPATH during test runs such that
+ Python subprocesses will have a dependency context
+ comparable to the test runner.
+
2.9
~~~
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/pytest-runner-2.9/PKG-INFO
new/pytest-runner-2.11.1/PKG-INFO
--- old/pytest-runner-2.9/PKG-INFO 2016-07-14 21:59:24.000000000 +0200
+++ new/pytest-runner-2.11.1/PKG-INFO 2017-02-08 23:02:15.000000000 +0100
@@ -1,17 +1,32 @@
Metadata-Version: 1.1
Name: pytest-runner
-Version: 2.9
+Version: 2.11.1
Summary: Invoke py.test as distutils command with dependency resolution
Home-page: https://github.com/pytest-dev/pytest-runner
Author: Jason R. Coombs
Author-email: [email protected]
License: UNKNOWN
-Description: pytest-runner
- =============
+Description: .. image:: https://img.shields.io/pypi/v/pytest-runner.svg
+ :target: https://pypi.org/project/pytest-runner
+
+ .. image:: https://img.shields.io/pypi/pyversions/pytest-runner.svg
+
+ .. image:: https://img.shields.io/pypi/dm/pytest-runner.svg
+
+ .. image::
https://img.shields.io/travis/pytest-dev/pytest-runner/master.svg
+ :target: http://travis-ci.org/pytest-dev/pytest-runner
Setup scripts can use pytest-runner to add setup.py test support for
pytest
runner.
+
+ License
+ =======
+
+ License is indicated in the project metadata (typically one or more
+ of the Trove classifiers). For more details, see `this explanation
+ <https://github.com/jaraco/skeleton/issues/1>`_.
+
Usage
-----
@@ -22,14 +37,14 @@
- Pass ``--index-url`` to have test requirements downloaded from an
alternate
index URL (unnecessary if specified for easy_install in setup.cfg).
- Pass additional py.test command-line options using ``--addopts``.
- - Set permanent options for the pytest distutils command in the
``[pytest]``
- section of setup.cfg.
- - Set permanent options for the pytest run itself in the ``[pytest]``
- section of pytest.ini or tox.ini. See `pytest 567
- <https://bitbucket.org/pytest-dev/pytest/issues/567/>`_ for details
on
- why setup.cfg is inadequate.
- - Optionally, set ``test=pytest`` in the ``[aliases]`` section of
setup.cfg
- to cause ``setup.py test`` to invoke pytest.
+ - Set permanent options for the ``python setup.py pytest`` command
(like ``index-url``)
+ in the ``[pytest]`` section of ``setup.cfg``.
+ - Set permanent options for the ``py.test`` run (like ``addopts`` or
``pep8ignore``) in the ``[pytest]``
+ section of ``pytest.ini`` or ``tox.ini`` or put them in the
``[tool:pytest]``
+ section of ``setup.cfg``. See `pytest issue 567
+ <https://github.com/pytest-dev/pytest/issues/567>`_.
+ - Optionally, set ``test=pytest`` in the ``[aliases]`` section of
``setup.cfg``
+ to cause ``python setup.py test`` to invoke pytest.
Example
-------
@@ -49,13 +64,17 @@
plugins) may be added to tests_require and will be downloaded and
required by the session before invoking pytest.
- See the `jaraco.collections
- <https://github.com/jaraco/jaraco.collections>`_ project
- for real-world usage.
+ Follow `this search on github
+
<https://github.com/search?utf8=%E2%9C%93&q=filename%3Asetup.py+pytest-runner&type=Code&ref=searchresults>`_
+ for examples of real-world usage.
Standalone Example
------------------
+ This technique is deprecated - if you have standalone scripts
+ you wish to invoke with dependencies, `use rwt
+ <https://pypi.org/project/rwt>`_.
+
Although ``pytest-runner`` is typically used to add pytest test
runner support to maintained packages, ``pytest-runner`` may
also be used to create standalone tests. Consider `this example
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/pytest-runner-2.9/README.rst
new/pytest-runner-2.11.1/README.rst
--- old/pytest-runner-2.9/README.rst 2016-07-14 21:57:54.000000000 +0200
+++ new/pytest-runner-2.11.1/README.rst 2017-02-08 23:01:52.000000000 +0100
@@ -1,9 +1,24 @@
-pytest-runner
-=============
+.. image:: https://img.shields.io/pypi/v/pytest-runner.svg
+ :target: https://pypi.org/project/pytest-runner
+
+.. image:: https://img.shields.io/pypi/pyversions/pytest-runner.svg
+
+.. image:: https://img.shields.io/pypi/dm/pytest-runner.svg
+
+.. image:: https://img.shields.io/travis/pytest-dev/pytest-runner/master.svg
+ :target: http://travis-ci.org/pytest-dev/pytest-runner
Setup scripts can use pytest-runner to add setup.py test support for pytest
runner.
+
+License
+=======
+
+License is indicated in the project metadata (typically one or more
+of the Trove classifiers). For more details, see `this explanation
+<https://github.com/jaraco/skeleton/issues/1>`_.
+
Usage
-----
@@ -14,14 +29,14 @@
- Pass ``--index-url`` to have test requirements downloaded from an alternate
index URL (unnecessary if specified for easy_install in setup.cfg).
- Pass additional py.test command-line options using ``--addopts``.
-- Set permanent options for the pytest distutils command in the ``[pytest]``
- section of setup.cfg.
-- Set permanent options for the pytest run itself in the ``[pytest]``
- section of pytest.ini or tox.ini. See `pytest 567
- <https://bitbucket.org/pytest-dev/pytest/issues/567/>`_ for details on
- why setup.cfg is inadequate.
-- Optionally, set ``test=pytest`` in the ``[aliases]`` section of setup.cfg
- to cause ``setup.py test`` to invoke pytest.
+- Set permanent options for the ``python setup.py pytest`` command (like
``index-url``)
+ in the ``[pytest]`` section of ``setup.cfg``.
+- Set permanent options for the ``py.test`` run (like ``addopts`` or
``pep8ignore``) in the ``[pytest]``
+ section of ``pytest.ini`` or ``tox.ini`` or put them in the ``[tool:pytest]``
+ section of ``setup.cfg``. See `pytest issue 567
+ <https://github.com/pytest-dev/pytest/issues/567>`_.
+- Optionally, set ``test=pytest`` in the ``[aliases]`` section of ``setup.cfg``
+ to cause ``python setup.py test`` to invoke pytest.
Example
-------
@@ -41,13 +56,17 @@
plugins) may be added to tests_require and will be downloaded and
required by the session before invoking pytest.
-See the `jaraco.collections
-<https://github.com/jaraco/jaraco.collections>`_ project
-for real-world usage.
+Follow `this search on github
+<https://github.com/search?utf8=%E2%9C%93&q=filename%3Asetup.py+pytest-runner&type=Code&ref=searchresults>`_
+for examples of real-world usage.
Standalone Example
------------------
+This technique is deprecated - if you have standalone scripts
+you wish to invoke with dependencies, `use rwt
+<https://pypi.org/project/rwt>`_.
+
Although ``pytest-runner`` is typically used to add pytest test
runner support to maintained packages, ``pytest-runner`` may
also be used to create standalone tests. Consider `this example
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/pytest-runner-2.9/docs/conf.py
new/pytest-runner-2.11.1/docs/conf.py
--- old/pytest-runner-2.9/docs/conf.py 2016-07-14 21:57:54.000000000 +0200
+++ new/pytest-runner-2.11.1/docs/conf.py 2017-02-08 23:01:52.000000000
+0100
@@ -1,7 +1,12 @@
#!/usr/bin/env python3
# -*- coding: utf-8 -*-
-import setuptools_scm
+import os
+import sys
+import subprocess
+
+if 'check_output' not in dir(subprocess):
+ import subprocess32 as subprocess
extensions = [
'sphinx.ext.autodoc',
@@ -9,31 +14,41 @@
]
# General information about the project.
-project = 'pytest-runner'
-copyright = '2015,2016 Jason R. Coombs'
-# The short X.Y version.
-version = setuptools_scm.get_version(root='..', relative_to=__file__)
+root = os.path.join(os.path.dirname(__file__), '..')
+setup_script = os.path.join(root, 'setup.py')
+fields = ['--name', '--version', '--url', '--author']
+dist_info_cmd = [sys.executable, setup_script] + fields
+output_bytes = subprocess.check_output(dist_info_cmd, cwd=root)
+project, version, url, author =
output_bytes.decode('utf-8').strip().split('\n')
+
+copyright = '2015-2017 ' + author
+
# The full version, including alpha/beta/rc tags.
release = version
master_doc = 'index'
link_files = {
- 'CHANGES.rst': dict(
+ '../CHANGES.rst': dict(
using=dict(
GH='https://github.com',
project=project,
+ url=url,
),
replace=[
dict(
pattern=r"(Issue )?#(?P<issue>\d+)",
- url='{GH}/pytest-dev/{project}/issues/{issue}',
+ url='{url}/issues/{issue}',
),
dict(
pattern=r"^(?m)((?P<scm_version>v?\d+(\.\d+){1,2}))\n[-=]+\n",
with_scm="{text}\n{rev[timestamp]:%d %b %Y}\n",
),
+ dict(
+ pattern=r"PEP[- ](?P<pep_number>\d+)",
+
url='https://www.python.org/dev/peps/pep-{pep_number:0>4}/',
+ ),
],
),
}
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/pytest-runner-2.9/docs/requirements.txt
new/pytest-runner-2.11.1/docs/requirements.txt
--- old/pytest-runner-2.9/docs/requirements.txt 1970-01-01 01:00:00.000000000
+0100
+++ new/pytest-runner-2.11.1/docs/requirements.txt 2017-02-08
23:01:52.000000000 +0100
@@ -0,0 +1 @@
+rst.linker
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/pytest-runner-2.9/ptr.py
new/pytest-runner-2.11.1/ptr.py
--- old/pytest-runner-2.9/ptr.py 2016-07-14 21:57:54.000000000 +0200
+++ new/pytest-runner-2.11.1/ptr.py 2017-02-08 23:01:52.000000000 +0100
@@ -6,6 +6,14 @@
import shlex as _shlex
import contextlib as _contextlib
import sys as _sys
+import operator as _operator
+import itertools as _itertools
+
+try:
+ # ensure that map has the same meaning on Python 2
+ from future_builtins import map
+except ImportError:
+ pass
import pkg_resources
import setuptools.command.test as orig
@@ -22,6 +30,11 @@
_sys.argv[:] = saved
+@_contextlib.contextmanager
+def null():
+ yield
+
+
class PyTest(orig.test):
"""
>>> import setuptools
@@ -61,28 +74,80 @@
and pkg_resources.evaluate_marker(marker)
)
+ @staticmethod
+ def _install_dists_compat(dist):
+ """
+ Copy of install_dists from setuptools 27.3.0.
+ """
+ ir_d = dist.fetch_build_eggs(dist.install_requires or [])
+ tr_d = dist.fetch_build_eggs(dist.tests_require or [])
+ return _itertools.chain(ir_d, tr_d)
+
+ def install_dists(self, dist):
+ """
+ Extend install_dists to include extras support
+ """
+ i_d = getattr(orig.test, 'install_dists',
self._install_dists_compat)
+ return _itertools.chain(i_d(dist),
self.install_extra_dists(dist))
+
+ def install_extra_dists(self, dist):
+ """
+ Install extras that are indicated by markers or
+ install all extras if '--extras' is indicated.
+ """
+ extras_require = dist.extras_require or {}
+
+ spec_extras = (
+ (spec.partition(':'), reqs)
+ for spec, reqs in extras_require.items()
+ )
+ matching_extras = (
+ reqs
+ for (name, sep, marker), reqs in spec_extras
+ # never include extras that fail to pass marker eval
+ if self.marker_passes(marker)
+ # include unnamed extras or all if self.extras indicated
+ and (not name or self.extras)
+ )
+ results = list(map(dist.fetch_build_eggs, matching_extras))
+ return _itertools.chain.from_iterable(results)
+
+ @staticmethod
+ def paths_on_pythonpath(paths):
+ """
+ Backward compatibility for paths_on_pythonpath;
+ Returns a null context if paths_on_pythonpath is
+ not implemented in orig.test.
+ Note that this also means that the paths iterable
+ is never consumed, which incidentally means that
+ the None values from dist.fetch_build_eggs in
+ older Setuptools will be disregarded.
+ """
+ try:
+ return orig.test.paths_on_pythonpath(paths)
+ except AttributeError:
+ return null()
+
+ def _super_run(self):
+ if hasattr(orig.test, 'install_dists'):
+ return orig.test.run(self)
+
+ # for backward compatibility with setuptools < 27.3
+ installed_dists = self.install_dists(self.distribution)
+ if self.dry_run:
+ self.announce('skipping tests (dry run)')
+ return
+ paths = map(_operator.attrgetter('location'), installed_dists)
+ with self.paths_on_pythonpath(paths):
+ self.with_project_on_sys_path(self.run_tests)
+
def run(self):
"""
Override run to ensure requirements are available in this
session (but
don't install them anywhere).
"""
self._build_egg_fetcher()
- if self.distribution.install_requires:
-
self.distribution.fetch_build_eggs(self.distribution.install_requires)
- if self.distribution.tests_require:
-
self.distribution.fetch_build_eggs(self.distribution.tests_require)
- extras_require = self.distribution.extras_require or {}
- for spec, reqs in extras_require.items():
- name, sep, marker = spec.partition(':')
- if marker and not self.marker_passes(marker):
- continue
- # always include unnamed extras
- if not name or self.extras:
- self.distribution.fetch_build_eggs(reqs)
- if self.dry_run:
- self.announce('skipping tests (dry run)')
- return
- self.with_project_on_sys_path(self.run_tests)
+ self._super_run()
if self.result_code:
raise SystemExit(self.result_code)
return self.result_code
@@ -100,7 +165,7 @@
'find_links', 'site_dirs', 'index_url', 'optimize',
'site_dirs', 'allow_hosts'
)
- for key in opts.keys():
+ for key in list(opts.keys()):
if key not in keep:
del opts[key] # don't use any other settings
if main_dist.dependency_links:
@@ -122,6 +187,10 @@
cmd.ensure_finalized()
main_dist._egg_fetcher = cmd
+ @property
+ def _argv(self):
+ return ['pytest'] + self.addopts
+
def run_tests(self):
"""
Invoke pytest, replacing argv.
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/pytest-runner-2.9/pytest.ini
new/pytest-runner-2.11.1/pytest.ini
--- old/pytest-runner-2.9/pytest.ini 2016-07-14 21:57:54.000000000 +0200
+++ new/pytest-runner-2.11.1/pytest.ini 2017-02-08 23:01:52.000000000 +0100
@@ -1,4 +1,4 @@
[pytest]
-norecursedirs=*.egg .eggs dist build
+norecursedirs=dist build .tox
addopts=--doctest-modules
doctest_optionflags=ALLOW_UNICODE ELLIPSIS
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/pytest-runner-2.9/pytest_runner.egg-info/PKG-INFO
new/pytest-runner-2.11.1/pytest_runner.egg-info/PKG-INFO
--- old/pytest-runner-2.9/pytest_runner.egg-info/PKG-INFO 2016-07-14
21:59:24.000000000 +0200
+++ new/pytest-runner-2.11.1/pytest_runner.egg-info/PKG-INFO 2017-02-08
23:02:15.000000000 +0100
@@ -1,17 +1,32 @@
Metadata-Version: 1.1
Name: pytest-runner
-Version: 2.9
+Version: 2.11.1
Summary: Invoke py.test as distutils command with dependency resolution
Home-page: https://github.com/pytest-dev/pytest-runner
Author: Jason R. Coombs
Author-email: [email protected]
License: UNKNOWN
-Description: pytest-runner
- =============
+Description: .. image:: https://img.shields.io/pypi/v/pytest-runner.svg
+ :target: https://pypi.org/project/pytest-runner
+
+ .. image:: https://img.shields.io/pypi/pyversions/pytest-runner.svg
+
+ .. image:: https://img.shields.io/pypi/dm/pytest-runner.svg
+
+ .. image::
https://img.shields.io/travis/pytest-dev/pytest-runner/master.svg
+ :target: http://travis-ci.org/pytest-dev/pytest-runner
Setup scripts can use pytest-runner to add setup.py test support for
pytest
runner.
+
+ License
+ =======
+
+ License is indicated in the project metadata (typically one or more
+ of the Trove classifiers). For more details, see `this explanation
+ <https://github.com/jaraco/skeleton/issues/1>`_.
+
Usage
-----
@@ -22,14 +37,14 @@
- Pass ``--index-url`` to have test requirements downloaded from an
alternate
index URL (unnecessary if specified for easy_install in setup.cfg).
- Pass additional py.test command-line options using ``--addopts``.
- - Set permanent options for the pytest distutils command in the
``[pytest]``
- section of setup.cfg.
- - Set permanent options for the pytest run itself in the ``[pytest]``
- section of pytest.ini or tox.ini. See `pytest 567
- <https://bitbucket.org/pytest-dev/pytest/issues/567/>`_ for details
on
- why setup.cfg is inadequate.
- - Optionally, set ``test=pytest`` in the ``[aliases]`` section of
setup.cfg
- to cause ``setup.py test`` to invoke pytest.
+ - Set permanent options for the ``python setup.py pytest`` command
(like ``index-url``)
+ in the ``[pytest]`` section of ``setup.cfg``.
+ - Set permanent options for the ``py.test`` run (like ``addopts`` or
``pep8ignore``) in the ``[pytest]``
+ section of ``pytest.ini`` or ``tox.ini`` or put them in the
``[tool:pytest]``
+ section of ``setup.cfg``. See `pytest issue 567
+ <https://github.com/pytest-dev/pytest/issues/567>`_.
+ - Optionally, set ``test=pytest`` in the ``[aliases]`` section of
``setup.cfg``
+ to cause ``python setup.py test`` to invoke pytest.
Example
-------
@@ -49,13 +64,17 @@
plugins) may be added to tests_require and will be downloaded and
required by the session before invoking pytest.
- See the `jaraco.collections
- <https://github.com/jaraco/jaraco.collections>`_ project
- for real-world usage.
+ Follow `this search on github
+
<https://github.com/search?utf8=%E2%9C%93&q=filename%3Asetup.py+pytest-runner&type=Code&ref=searchresults>`_
+ for examples of real-world usage.
Standalone Example
------------------
+ This technique is deprecated - if you have standalone scripts
+ you wish to invoke with dependencies, `use rwt
+ <https://pypi.org/project/rwt>`_.
+
Although ``pytest-runner`` is typically used to add pytest test
runner support to maintained packages, ``pytest-runner`` may
also be used to create standalone tests. Consider `this example
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/pytest-runner-2.9/pytest_runner.egg-info/SOURCES.txt
new/pytest-runner-2.11.1/pytest_runner.egg-info/SOURCES.txt
--- old/pytest-runner-2.9/pytest_runner.egg-info/SOURCES.txt 2016-07-14
21:59:24.000000000 +0200
+++ new/pytest-runner-2.11.1/pytest_runner.egg-info/SOURCES.txt 2017-02-08
23:02:15.000000000 +0100
@@ -1,6 +1,3 @@
-.gitignore
-.hgignore
-.hgtags
.travis.yml
CHANGES.rst
LICENSE
@@ -9,12 +6,15 @@
pytest.ini
setup.cfg
setup.py
+tox.ini
docs/conf.py
docs/history.rst
docs/index.rst
+docs/requirements.txt
pytest_runner.egg-info/PKG-INFO
pytest_runner.egg-info/SOURCES.txt
pytest_runner.egg-info/dependency_links.txt
pytest_runner.egg-info/entry_points.txt
pytest_runner.egg-info/namespace_packages.txt
-pytest_runner.egg-info/top_level.txt
\ No newline at end of file
+pytest_runner.egg-info/top_level.txt
+tests/requirements.txt
\ No newline at end of file
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/pytest-runner-2.9/setup.cfg
new/pytest-runner-2.11.1/setup.cfg
--- old/pytest-runner-2.9/setup.cfg 2016-07-14 21:59:24.000000000 +0200
+++ new/pytest-runner-2.11.1/setup.cfg 2017-02-08 23:02:15.000000000 +0100
@@ -1,12 +1,12 @@
[aliases]
-release = clean --all sdist bdist_wheel build_sphinx upload upload_docs
-test = pytest
+release = dists upload
+dists = clean --all sdist bdist_wheel
[wheel]
universal = 1
[egg_info]
-tag_svn_revision = 0
tag_build =
tag_date = 0
+tag_svn_revision = 0
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/pytest-runner-2.9/setup.py
new/pytest-runner-2.11.1/setup.py
--- old/pytest-runner-2.9/setup.py 2016-07-14 21:57:54.000000000 +0200
+++ new/pytest-runner-2.11.1/setup.py 2017-02-08 23:01:52.000000000 +0100
@@ -3,24 +3,16 @@
# Project skeleton maintained at https://github.com/jaraco/skeleton
import io
-import sys
import setuptools
with io.open('README.rst', encoding='utf-8') as readme:
long_description = readme.read()
-needs_pytest = set(['pytest', 'test']).intersection(sys.argv)
-pytest_runner = ['pytest_runner'] if needs_pytest else []
-needs_sphinx = set(['release', 'build_sphinx',
'upload_docs']).intersection(sys.argv)
-sphinx = ['sphinx', 'rst.linker'] if needs_sphinx else []
-needs_wheel = set(['release', 'bdist_wheel']).intersection(sys.argv)
-wheel = ['wheel'] if needs_wheel else []
-
name = 'pytest-runner'
description = 'Invoke py.test as distutils command with dependency resolution'
-setup_params = dict(
+params = dict(
name=name,
use_scm_version=True,
author="Jason R. Coombs",
@@ -35,10 +27,7 @@
extras_require={
},
setup_requires=[
- 'setuptools_scm>=1.9',
- ] + pytest_runner + sphinx + wheel,
- tests_require=[
- 'pytest>=2.8',
+ 'setuptools_scm>=1.15.0',
],
classifiers=[
"Development Status :: 5 - Production/Stable",
@@ -57,4 +46,4 @@
},
)
if __name__ == '__main__':
- setuptools.setup(**setup_params)
+ setuptools.setup(**params)
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/pytest-runner-2.9/tests/requirements.txt
new/pytest-runner-2.11.1/tests/requirements.txt
--- old/pytest-runner-2.9/tests/requirements.txt 1970-01-01
01:00:00.000000000 +0100
+++ new/pytest-runner-2.11.1/tests/requirements.txt 2017-02-08
23:01:52.000000000 +0100
@@ -0,0 +1,2 @@
+pytest >= 2.8
+subprocess32; python_version=="2.6"
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/pytest-runner-2.9/tox.ini
new/pytest-runner-2.11.1/tox.ini
--- old/pytest-runner-2.9/tox.ini 1970-01-01 01:00:00.000000000 +0100
+++ new/pytest-runner-2.11.1/tox.ini 2017-02-08 23:01:52.000000000 +0100
@@ -0,0 +1,6 @@
+[testenv]
+deps =
+ -rtests/requirements.txt
+
+commands = py.test {posargs}
+usedevelop = True