Skip to content

Commit

Permalink
Merge pull request #114 from nicoddemus/release-1.4.33-2nd-attempt
Browse files Browse the repository at this point in the history
Release 1.4.33 2nd attempt
  • Loading branch information
nicoddemus committed Mar 17, 2017
2 parents 0e37a0a + 8699a97 commit 97efc1c
Show file tree
Hide file tree
Showing 9 changed files with 21 additions and 32 deletions.
1 change: 1 addition & 0 deletions .gitattributes
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
*.dump eol=lf
2 changes: 2 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -8,3 +8,5 @@ __pycache__/

*.egg-info
.eggs/

dist/*
4 changes: 2 additions & 2 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,5 +11,5 @@ matrix:
allow_failures:
- python: pypy
cache: python
install: pip install tox
script: tox -e py
install: pip install tox-travis
script: tox
2 changes: 1 addition & 1 deletion MANIFEST.in
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
include CHANGELOG
include AUTHORS
include README.txt
include README.rst
include setup.py
include LICENSE
include conftest.py
Expand Down
4 changes: 2 additions & 2 deletions py/__init__.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
"""
py.test and pylib: rapid testing and development utils
pylib: rapid testing and development utils
this module uses apipkg.py for lazy-loading sub modules
and classes. The initpkg-dictionary below specifies
Expand All @@ -8,7 +8,7 @@
(c) Holger Krekel and others, 2004-2014
"""
__version__ = '1.4.33.dev1'
__version__ = '1.4.33'

from py import _apipkg

Expand Down
18 changes: 9 additions & 9 deletions testing/code/test_assertion.py
Original file line number Diff line number Diff line change
Expand Up @@ -108,7 +108,7 @@ def f(x=3):
assert f(x=5)
except AssertionError:
e = exvalue()
assert "x=5" in e.msg
assert "x=5" in str(e)

# These tests should both fail, but should fail nicely...
class WeirdRepr:
Expand All @@ -121,16 +121,16 @@ def bug_test_assert_repr():
assert v == 1
except AssertionError:
e = exvalue()
assert e.msg.find('WeirdRepr') != -1
assert e.msg.find('second line') != -1
assert str(e).find('WeirdRepr') != -1
assert str(e).find('second line') != -1
assert 0

def test_assert_non_string():
try:
assert 0, ['list']
except AssertionError:
e = exvalue()
assert e.msg.find("list") != -1
assert str(e).find("list") != -1

def test_assert_implicit_multiline():
try:
Expand All @@ -139,7 +139,7 @@ def test_assert_implicit_multiline():
2, 3]
except AssertionError:
e = exvalue()
assert e.msg.find('assert [1, 2, 3] !=') != -1
assert str(e).find('assert [1, 2, 3] !=') != -1


def test_assert_with_brokenrepr_arg():
Expand All @@ -154,14 +154,14 @@ def test_multiple_statements_per_line():
a = 1; assert a == 2
except AssertionError:
e = exvalue()
assert "assert 1 == 2" in e.msg
assert "assert 1 == 2" in str(e)

def test_power():
try:
assert 2**3 == 7
except AssertionError:
e = exvalue()
assert "assert (2 ** 3) == 7" in e.msg
assert "assert (2 ** 3) == 7" in str(e)


class TestView:
Expand Down Expand Up @@ -285,8 +285,8 @@ def __init__(self, *args):
super(SomeEx, self).__init__()
try:
raise SomeEx("hello")
except AssertionError:
s = str(exvalue())
except AssertionError as e:
s = str(e)
assert 're-run' not in s
assert 'could not determine' in s

Expand Down
2 changes: 1 addition & 1 deletion testing/path/test_local.py
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ def __init__(self, path):
self._path = path
def __fspath__(self):
return self._path
return FakeFSPathClass("this/is/a/fake/path")
return FakeFSPathClass(os.path.join("this", "is", "a", "fake", "path"))

class TestLocalPath(common.CommonFSTests):
def test_join_normpath(self, tmpdir):
Expand Down
2 changes: 1 addition & 1 deletion testing/test_iniconfig.py
Original file line number Diff line number Diff line change
Expand Up @@ -153,7 +153,7 @@ def test_iniconfig_section_first(tmpdir):
excinfo = py.test.raises(ParseError, """
IniConfig("x", data='name=1')
""")
assert excinfo.value.msg == "no section header defined"
assert "no section header defined" in str(excinfo.value)

def test_iniconig_section_duplicate_fails():
excinfo = py.test.raises(ParseError, r"""
Expand Down
18 changes: 2 additions & 16 deletions tox.ini
Original file line number Diff line number Diff line change
@@ -1,8 +1,5 @@
[tox]
envlist=py26,py27,py33,py34,py35,external
# py27-xdist causes problems with svn, py25 requires virtualenv==1.9.1
#indexserver=
# default=http://pypi.testrun.org
envlist=py26,py27,py33,py34,py35

[testenv]
changedir=testing
Expand All @@ -23,17 +20,6 @@ changedir=testing
commands=
{envpython} -m pytest --confcutdir=.. -rfsxX --junitxml={envlogdir}/junit-{envname}0.xml {posargs:io_ code}

[testenv:py25]
setenv = PIP_INSECURE=1

[testenv:external]
deps=
pytest
jinja2
decorator
commands=
py.test --confcutdir=.. -rfsxX --junitxml={envlogdir}/junit-{envname}.xml {posargs:code}

[pytest]
rsyncdirs = conftest.py py doc testing
addopts = -rxXf
addopts = -ra

0 comments on commit 97efc1c

Please sign in to comment.