Skip to content

Commit 282d0d3

Browse files
committed
add python 3.4 support
1 parent d4a8599 commit 282d0d3

File tree

5 files changed

+27
-25
lines changed

5 files changed

+27
-25
lines changed

README.rst

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ pytest-echo
1111

1212
Print environment variables, package version and generic attributes.
1313

14-
Useful in the continuous integration to dump env configuration.
14+
Useful in the continuous integration to dump test configuration/environment.
1515

1616

1717
Install
@@ -28,7 +28,7 @@ The plugin provides ability to print some extra information prior to run the tes
2828

2929

3030
Example
31-
--------
31+
-------
3232

3333
Dump environment variables
3434
~~~~~~~~~~~~~~~~~~~~~~~~~~

pytest_echo.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
from pprint import pformat
44

55

6-
__version__ = '1.2'
6+
__version__ = '1.3'
77

88

99
class RetrieveException(Exception):

setup.py

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,8 @@
1717
install_requires=['pytest>=2.2'],
1818
license="MIT License",
1919
classifiers=[
20-
'Development Status :: 3 - Alpha',
20+
'Development Status :: 5 - Production/Stable',
21+
'Environment :: Plugins',
2122
'Intended Audience :: Developers',
2223
'License :: OSI Approved :: MIT License',
2324
'Operating System :: POSIX',
@@ -28,5 +29,6 @@
2829
'Topic :: Utilities',
2930
'Programming Language :: Python',
3031
'Programming Language :: Python :: 2.7',
31-
'Programming Language :: Python :: 3.3'
32+
'Programming Language :: Python :: 3.3',
33+
'Programming Language :: Python :: 3.4',
3234
])

test_echo.py

Lines changed: 16 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -30,70 +30,70 @@ def test_echo_env(testdir):
3030
os.environ['PYTESTECHO'] = '123'
3131
result = testdir.runpytest('--echo-env=PYTESTECHO')
3232
result.stdout.fnmatch_lines([
33-
"PYTESTECHO: 123",
33+
" PYTESTECHO: 123"
3434
])
3535

3636

3737
def test_echo_version(testdir):
3838
result = testdir.runpytest('--echo-version=pytest_echo')
39-
result.stdout.fnmatch_lines(["pytest_echo: %s" % pytest_echo.__version__])
39+
result.stdout.fnmatch_lines([" pytest_echo: %s" % pytest_echo.__version__])
4040

4141

4242
def test_echo_all(testdir):
4343
os.environ['PYTESTECHO'] = '123'
4444
result = testdir.runpytest('--echo-version=pytest_echo',
4545
'--echo-env=PYTESTECHO')
46-
result.stdout.fnmatch_lines(["PYTESTECHO: 123"])
47-
result.stdout.fnmatch_lines(["pytest_echo: %s" % pytest_echo.__version__])
46+
result.stdout.fnmatch_lines([" PYTESTECHO: 123"])
47+
result.stdout.fnmatch_lines([" pytest_echo: %s" % pytest_echo.__version__])
4848

4949

5050
def test_echo_attr(testdir):
5151
result = testdir.runpytest('--echo-attr=test_echo.ATTR_INT')
52-
result.stdout.fnmatch_lines(['test_echo.ATTR_INT: 111'])
52+
result.stdout.fnmatch_lines([' test_echo.ATTR_INT: 111'])
5353

5454

5555
def test_echo_attr_dict(testdir):
5656
result = testdir.runpytest('--echo-attr=test_echo.ATTR_DICT.key')
57-
result.stdout.fnmatch_lines(["test_echo.ATTR_DICT.key: 'value'"])
57+
result.stdout.fnmatch_lines([" test_echo.ATTR_DICT.key: 'value'"])
5858

5959

6060
def test_echo_attr_list(testdir):
6161
result = testdir.runpytest('--echo-attr=test_echo.ATTR_LIST.2')
62-
result.stdout.fnmatch_lines([u"test_echo.ATTR_LIST.2: 13"])
62+
result.stdout.fnmatch_lines([u" test_echo.ATTR_LIST.2: 13"])
6363

6464

6565
def test_echo_attr_list_inner(testdir):
6666
result = testdir.runpytest('--echo-attr=test_echo.ATTR_LIST.3.1')
67-
assert u"test_echo.ATTR_LIST.3.1: 22" in result.stdout.lines
67+
assert u" test_echo.ATTR_LIST.3.1: 22" in result.stdout.lines
6868

6969

7070
def test_echo_attr_list_composite(testdir):
7171
result = testdir.runpytest('--echo-attr=test_echo.ATTR_COMPOSITE.key1',
7272
'--echo-attr=test_echo.ATTR_COMPOSITE.key2.3')
73-
assert u"test_echo.ATTR_COMPOSITE.key1: 'value1'" in result.stdout.lines
74-
assert u"test_echo.ATTR_COMPOSITE.key2.3: 14" in result.stdout.lines
73+
assert u" test_echo.ATTR_COMPOSITE.key1: 'value1'" in result.stdout.lines
74+
assert u" test_echo.ATTR_COMPOSITE.key2.3: 14" in result.stdout.lines
7575

7676

7777
def test_echo_attr_list_callable(testdir):
7878
result = testdir.runpytest('--echo-attr=test_echo.FUNC')
7979
result.stdout.fnmatch_lines([
80-
"test_echo.FUNC: <function FUNC*",
80+
" test_echo.FUNC: <function FUNC*",
8181
])
8282

8383

8484
def test_echo_attr_object_attr(testdir):
8585
result = testdir.runpytest('--echo-attr=test_echo.dummy.attr')
8686
result.stdout.fnmatch_lines([
87-
"test_echo.dummy.attr: 1",
87+
" test_echo.dummy.attr: 1",
8888
])
8989

9090

9191
def test_echo_attr_module_object_attr(testdir):
9292
result = testdir.runpytest('--echo-attr=linecache.cache.__class__')
9393
if sys.version_info[0] == 2:
94-
match = "linecache.cache.__class__: <type 'dict'>"
94+
match = " linecache.cache.__class__: <type 'dict'>"
9595
elif sys.version_info[0] == 3:
96-
match = "linecache.cache.__class__: <class 'dict'>"
96+
match = " linecache.cache.__class__: <class 'dict'>"
9797

9898
result.stdout.fnmatch_lines([match])
9999

@@ -107,7 +107,7 @@ def pytest_configure(config):
107107
""")
108108
result = testdir.runpytest('--echo-attr=django.conf.settings.DEBUG')
109109
result.stdout.fnmatch_lines([
110-
"django.conf.settings.DEBUG: False",
110+
" django.conf.settings.DEBUG: False",
111111
])
112112

113113
def test_django_settings_extended(testdir):
@@ -120,6 +120,6 @@ def pytest_configure(config):
120120
""")
121121
result = testdir.runpytest('--echo-attr=django.conf.settings.DATABASES.default.ENGINE')
122122
result.stdout.fnmatch_lines([
123-
"django.conf.settings.DATABASES.default.ENGINE: 'sqlite3'"
123+
" django.conf.settings.DATABASES.default.ENGINE: 'sqlite3'"
124124
])
125125

tox.ini

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,10 @@
11
[tox]
2-
envlist=py27,py33
2+
envlist=py27,py33,py34
33

44
[testenv]
5-
deps = pytest
6-
django
7-
pip
5+
deps = pytest
6+
pytest-cache
7+
django
88

99
commands =
1010
pip install -e {toxinidir}

0 commit comments

Comments
 (0)