Skip to content

Commit cea982f

Browse files
committed
bump 1.1
1 parent 4d67a79 commit cea982f

File tree

4 files changed

+26
-15
lines changed

4 files changed

+26
-15
lines changed

MANIFEST.in

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,8 @@
1+
graft docs
12
include CHANGELOG
3+
include LICENSE
4+
include pytest_echo.py
25
include README.rst
36
include setup.py
47
include test_echo.py
58
include tox.ini
6-
include LICENSE
7-
graft docs

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.0'
6+
__version__ = '1.1'
77

88

99
class RetrieveException(Exception):

test_echo.py

Lines changed: 17 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
import os
2-
import pytest
2+
import sys
33
import pytest_echo
44

55
pytest_plugins = "pytester",
@@ -29,35 +29,37 @@ def test_version():
2929
def test_echo_env(testdir):
3030
os.environ['PYTESTECHO'] = '123'
3131
result = testdir.runpytest('--echo-env=PYTESTECHO')
32-
assert "PYTESTECHO: 123" in result.stdout.lines
32+
result.stdout.fnmatch_lines([
33+
"PYTESTECHO: 123",
34+
])
3335

3436

3537
def test_echo_version(testdir):
3638
result = testdir.runpytest('--echo-version=pytest_echo')
37-
assert "pytest_echo: %s" % pytest_echo.__version__ in result.stdout.lines
39+
result.stdout.fnmatch_lines(["pytest_echo: %s" % pytest_echo.__version__])
3840

3941

4042
def test_echo_all(testdir):
4143
os.environ['PYTESTECHO'] = '123'
4244
result = testdir.runpytest('--echo-version=pytest_echo',
4345
'--echo-env=PYTESTECHO')
44-
assert "PYTESTECHO: 123" in result.stdout.lines
45-
assert "pytest_echo: %s" % pytest_echo.__version__ in result.stdout.lines
46+
result.stdout.fnmatch_lines(["PYTESTECHO: 123"])
47+
result.stdout.fnmatch_lines(["pytest_echo: %s" % pytest_echo.__version__])
4648

4749

4850
def test_echo_attr(testdir):
4951
result = testdir.runpytest('--echo-attr=test_echo.ATTR_INT')
50-
assert 'test_echo.ATTR_INT: 111' in result.stdout.lines
52+
result.stdout.fnmatch_lines(['test_echo.ATTR_INT: 111'])
5153

5254

5355
def test_echo_attr_dict(testdir):
5456
result = testdir.runpytest('--echo-attr=test_echo.ATTR_DICT.key')
55-
assert u"test_echo.ATTR_DICT.key: 'value'" in result.stdout.lines
57+
result.stdout.fnmatch_lines(["test_echo.ATTR_DICT.key: 'value'"])
5658

5759

5860
def test_echo_attr_list(testdir):
5961
result = testdir.runpytest('--echo-attr=test_echo.ATTR_LIST.2')
60-
assert u"test_echo.ATTR_LIST.2: 13" in result.stdout.lines
62+
result.stdout.fnmatch_lines([u"test_echo.ATTR_LIST.2: 13"])
6163

6264

6365
def test_echo_attr_list_inner(testdir):
@@ -88,13 +90,16 @@ def test_echo_attr_object_attr(testdir):
8890

8991
def test_echo_attr_module_object_attr(testdir):
9092
result = testdir.runpytest('--echo-attr=linecache.cache.__class__')
91-
result.stdout.fnmatch_lines([
92-
"linecache.cache.__class__: <type 'dict'>",
93-
])
93+
if sys.version_info[0] == 2:
94+
match = "linecache.cache.__class__: <type 'dict'>"
95+
elif sys.version_info[0] == 3:
96+
match = "linecache.cache.__class__: <class 'dict'>"
97+
98+
result.stdout.fnmatch_lines([match])
9499

95100

96101
def test_django_settings(testdir):
97-
p = testdir.makeconftest("""
102+
testdir.makeconftest("""
98103
def pytest_configure(config):
99104
import django
100105
from django.conf import settings # noqa

tox.ini

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,12 +3,17 @@ envlist=py27,py33
33

44
[testenv]
55
deps = pytest
6+
django
7+
pip
8+
69
commands =
10+
pip install -e {toxinidir}
711
py.test --junitxml={envlogdir}/junit-{envname}.xml {posargs:test_echo.py}
812

913
[pytest]
1014
pep8ignore = E128 E302
1115
doc/conf.py ALL
16+
1217
addopts =
1318
--tb=short
1419
--capture=no

0 commit comments

Comments
 (0)