Skip to content

Commit 9397934

Browse files
committed
Merge branch 'release/1.6'
* release/1.6: updates Makefile/tox update gitignore add Makefile removed pip dependency start 1.6 updates setup.py update README update README update README
2 parents 15d9fbc + 681f14c commit 9397934

File tree

7 files changed

+60
-33
lines changed

7 files changed

+60
-33
lines changed

.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,3 +8,4 @@ __pycache__
88
docs/_build
99
.coverage
1010
~build
11+
build

CHANGELOG

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,8 @@
1+
1.6.0 (dev)
2+
-----------
3+
* removed pip dependency
4+
* drop support pytest<3.0
5+
16
1.5.1
27
-----
38
* drop suport python 2.6

Makefile

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
build:
2+
python setup.py sdist bdist_wheel
3+
4+
clean:
5+
rm -fr dist build pytest_echo.egg-info .coverage ./~build
6+
7+
fullclean: clean
8+
rm -fr .tox .cache .pytest_cache
9+
find . -name '*.pyc' -exec rm -f {} +
10+
11+
release: build
12+
twine upload dist/*
13+
$(MAKE) fullclean

README.rst

Lines changed: 19 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ Print environment variables, package version and generic attributes,
1212
as they are at the begining of the test.
1313

1414
Useful in the continuous integration to dump test
15-
configuration/environment and or to check is attributes are properly set
15+
configuration/environment and or to check if attributes are properly set
1616
(ie. you change environment with `os.environ`)
1717

1818

@@ -25,10 +25,6 @@ install via::
2525

2626

2727

28-
The plugin provides ability to print some extra information prior to run the tests.
29-
30-
31-
3228
Examples
3329
========
3430

@@ -57,6 +53,7 @@ Dump package version
5753
pytest_echo: 0.1
5854
plugins: echo, pydev, cov, cache, django
5955
56+
6057
.. warning:: The first attempt to retrieve the version is done via setuptools
6158
if it fails, the module is imported (``__import__(package)``) to retrieve the version reading
6259
``get_version``, ``__version__``, ``VERSION``, ``version`` so any module
@@ -150,21 +147,21 @@ or
150147
Links
151148
-----
152149

153-
+--------------------+----------------+--------------+-----------------+
154-
| Stable | |master-build| | |master-cov| | |master-doc| |
155-
+--------------------+----------------+--------------+-----------------+
156-
| Development | |dev-build| | |dev-cov| | |dev-doc| |
157-
+--------------------+-------------------------------------------------+
158-
| Project home page: |https://github.com/saxix/pytest-echo |
159-
+--------------------+-------------------------------------------------+
160-
| Issue tracker: |https://github.com/saxix/pytest-echo/issues?sort |
161-
+--------------------+-------------------------------------------------+
162-
| CI: |https://travis-ci.org/saxix/pytest-echo |
163-
+--------------------+-------------------------------------------------+
164-
| Download: |http://pypi.python.org/pypi/pytest-echo/ |
165-
+--------------------+-------------------------------------------------+
166-
| Documentation: |https://pytest-echo.readthedocs.org/en/latest/ |
167-
+--------------------+-------------------------------------------------+
150+
+--------------------+-----------------+---------------+----------------+
151+
| Stable | |master-build| | |master-cov| | |master-doc| |
152+
+--------------------+-----------------+---------------+----------------+
153+
| Development | |dev-build| | |dev-cov| | |dev-doc| |
154+
+--------------------+-----------------+---------------+----------------+
155+
| Project home page: | https://github.com/saxix/pytest-echo |
156+
+--------------------+--------------------------------------------------+
157+
| Issue tracker: | https://github.com/saxix/pytest-echo/issues?sort |
158+
+--------------------+--------------------------------------------------+
159+
| CI: | https://travis-ci.org/saxix/pytest-echo |
160+
+--------------------+--------------------------------------------------+
161+
| Download: | http://pypi.python.org/pypi/pytest-echo/ |
162+
+--------------------+--------------------------------------------------+
163+
| Documentation: | https://pytest-echo.readthedocs.org/en/latest/ |
164+
+--------------------+--------------------------------------------------+
168165

169166

170167
.. |master-build| image:: https://secure.travis-ci.org/saxix/pytest-echo.png?branch=master
@@ -180,8 +177,8 @@ Links
180177
:target: http://travis-ci.org/saxix/pytest-echo/
181178

182179
.. |dev-cov| image:: https://codecov.io/gh/saxix/pytest-echo/branch/develop/graph/badge.svg
183-
:target: https://codecov.io/gh/saxix/pytest-echo
180+
:target: https://codecov.io/gh/saxix/pytest-echo
184181

185182
.. |dev-doc| image:: https://readthedocs.org/projects/pytest-echo/badge/?version=latest
186-
:target: http://pytest-echo.readthedocs.io/en/latest/
183+
:target: http://pytest-echo.readthedocs.io/en/latest/
187184

pytest_echo.py

Lines changed: 11 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,21 @@
11
# -*- coding: utf-8 -*-
22
from __future__ import print_function
3+
34
import fnmatch
45
import os
56
from pprint import pformat
67

7-
import pip
8+
import pkg_resources
89
from pkg_resources import DistributionNotFound
910

10-
__version__ = '1.5.1'
11+
__version__ = '1.6.0'
12+
13+
14+
def get_installed_distributions():
15+
"""
16+
Return a list of installed Distribution objects.
17+
"""
18+
return [d for d in pkg_resources.working_set]
1119

1220

1321
def get_attr(obj, attr, default='NOT FOUND'):
@@ -105,7 +113,7 @@ def get_env(var_name):
105113
def get_version(package_name):
106114
if '*' in package_name:
107115
targets = [(i.key, i.version)
108-
for i in pip.get_installed_distributions()
116+
for i in get_installed_distributions()
109117
if fnmatch.fnmatch(i.key, package_name)]
110118
else:
111119
targets = [(package_name, _get_version(package_name))]

setup.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@
1212
version=__version__,
1313
author='Stefano Apostolico',
1414
author_email='[email protected]',
15-
url='http://pypi.python.org/pypi/pytest-echo/',
15+
url='https://github.com/saxix/pytest-echo',
1616
py_modules=['pytest_echo'],
1717
entry_points={'pytest11': ['echo = pytest_echo']},
1818
install_requires=['pytest>=2.2'],

tox.ini

Lines changed: 10 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,18 +1,21 @@
11
[tox]
2-
envlist=py27,py33,py34,py35,py36,pypy
2+
envlist=py{27,35,36}-pytest{30,31,32,33,34,35}
33

44
[testenv]
55
deps =
6-
py{27,33},pypy: django<2
7-
py{34,35,36}: django
8-
py{33,34}: pytest<3
9-
py{33,34}: py<1.5
106
coverage
7+
py{27,33},pypy: django<2
8+
py{34,35,36}: django>=2
9+
pytest30: pytest>=3.0,<3.1
10+
pytest31: pytest>=3.1,<3.2
11+
pytest32: pytest>=3.2,<3.3
12+
pytest33: pytest>=3.3,<3.4
13+
pytest34: pytest>=3.4,<3.5
14+
pytest35: pytest>=3.5,<3.6
1115

1216
commands =
13-
; py.test --pyargs test_echo.py
1417
pip install -e .
15-
coverage run -m py.test test_echo.py pytest_echo.py
18+
coverage run -m py.test -vv test_echo.py pytest_echo.py
1619
coverage report
1720
coverage html
1821

0 commit comments

Comments
 (0)