[py-svn] commit/pytest: 2 new changesets
Bitbucket
commits-noreply at bitbucket.org
Tue Aug 28 23:19:48 CEST 2012
2 new commits in pytest:
https://bitbucket.org/hpk42/pytest/changeset/08e928984d17/
changeset: 08e928984d17
user: gutworth
date: 2012-08-28 22:35:06
summary: remove usage of exception module, which is gone in py3.3
affected #: 2 files
diff -r 7aab1fcc72cd250cb161231bce28bf57559d5f01 -r 08e928984d178f92a5b75dcc4c0fd60dd3c1b6b7 _pytest/python.py
--- a/_pytest/python.py
+++ b/_pytest/python.py
@@ -781,7 +781,7 @@
# we want to catch a AssertionError
# replace our subclass with the builtin one
# see https://bitbucket.org/hpk42/pytest/issue/176/pytestraises
- from exceptions import AssertionError as ExpectedException
+ from _pytest.assertion.util import BuiltinAssertionError as ExpectedException
if not args:
return RaisesContext(ExpectedException)
diff -r 7aab1fcc72cd250cb161231bce28bf57559d5f01 -r 08e928984d178f92a5b75dcc4c0fd60dd3c1b6b7 testing/test_python.py
--- a/testing/test_python.py
+++ b/testing/test_python.py
@@ -1422,9 +1422,9 @@
def test_raises_flip_builtin_AssertionError(self):
# we replace AssertionError on python level
# however c code might still raise the builtin one
- import exceptions
+ from _pytest.assertion.util import BuiltinAssertionError
pytest.raises(AssertionError,"""
- raise exceptions.AssertionError
+ raise BuiltinAssertionError
""")
@pytest.mark.skipif('sys.version < "2.5"')
https://bitbucket.org/hpk42/pytest/changeset/a0ec8dac668c/
changeset: a0ec8dac668c
user: gutworth
date: 2012-08-28 22:37:43
summary: use py3 compatible print syntax
affected #: 1 file
diff -r 08e928984d178f92a5b75dcc4c0fd60dd3c1b6b7 -r a0ec8dac668c75ae89a5708d75943daecd91c238 testing/test_junitxml.py
--- a/testing/test_junitxml.py
+++ b/testing/test_junitxml.py
@@ -162,7 +162,7 @@
import pytest
@pytest.mark.parametrize('arg1', "<&'", ids="<&'")
def test_func(arg1):
- print arg1
+ print(arg1)
assert 0
""")
result, dom = runandparse(testdir)
Repository URL: https://bitbucket.org/hpk42/pytest/
--
This is a commit notification from bitbucket.org. You are receiving
this because you have the service enabled, addressing the recipient of
this email.
More information about the pytest-commit
mailing list