1 new commit in pytest-pep8:
https://bitbucket.org/hpk42/pytest-pep8/changeset/b367f45b6eb8/ changeset: b367f45b6eb8 user: hpk42 date: 2012-09-20 10:58:08 summary: fix unicode issue, reported by thomas waldmann affected #: 4 files diff -r 6ea1b7ce7fde9a4a89df643844f4db04a6ba22a0 -r b367f45b6eb84f02f4d8843869495b15dd9dc0bd pytest_pep8.py --- a/pytest_pep8.py +++ b/pytest_pep8.py @@ -3,7 +3,7 @@ import pytest import pep8 -__version__ = '1.0.2' +__version__ = '1.0.3.dev1' HISTKEY = "pep8/mtimes" @@ -47,7 +47,10 @@ def __init__(self, path, parent, pep8ignore): super(Pep8Item, self).__init__(path, parent) - self.keywords['pep8'] = True + if hasattr(self, "markers"): + self.markers.pep8 = pytest.mark.pep8 + else: + self.keywords["pep8"] = pytest.mark.pep8 self.pep8ignore = pep8ignore def setup(self): diff -r 6ea1b7ce7fde9a4a89df643844f4db04a6ba22a0 -r b367f45b6eb84f02f4d8843869495b15dd9dc0bd setup.py --- a/setup.py +++ b/setup.py @@ -5,11 +5,11 @@ name='pytest-pep8', description='pytest plugin to check PEP8 requirements', long_description=open("README.txt").read(), - version='1.0.2', + version='1.0.3.dev1', author='Holger Krekel and Ronny Pfannschmidt', author_email='holger.kre...@gmail.com', url='http://bitbucket.org/hpk42/pytest-pep8/', py_modules=['pytest_pep8'], entry_points={'pytest11': ['pep8 = pytest_pep8']}, - install_requires=['pytest-cache', 'pytest>=2.0', 'pep8>=1.3', ], + install_requires=['pytest-cache', 'pytest>=2.3.dev14', 'pep8>=1.3', ], ) diff -r 6ea1b7ce7fde9a4a89df643844f4db04a6ba22a0 -r b367f45b6eb84f02f4d8843869495b15dd9dc0bd test_pep8.py --- a/test_pep8.py +++ b/test_pep8.py @@ -1,4 +1,6 @@ +# coding=utf8 +import py pytest_plugins = "pytester", @@ -100,3 +102,19 @@ "*1 failed*", ]) assert 'passed' not in result.stdout.str() + + +def test_unicode_error(testdir): + x = testdir.tmpdir.join("x.py") + import codecs + f = codecs.open(str(x), "w", encoding="utf8") + f.write(py.builtin._totext(""" +# coding=utf8 + +accent_map = { + u'\\xc0': 'a', # À -> a non-ascii comment crashes it +} +""", "utf8")) + f.close() + result = testdir.runpytest("--pep8", x, "-s") + result.stdout.fnmatch_lines("*non-ascii comment*") diff -r 6ea1b7ce7fde9a4a89df643844f4db04a6ba22a0 -r b367f45b6eb84f02f4d8843869495b15dd9dc0bd tox.ini --- a/tox.ini +++ b/tox.ini @@ -1,5 +1,5 @@ [tox] -envlist=py25,py27,py32,py-xdist +envlist=py25,py27,py27-pytesttrunk,py32,py-xdist indexserver = default = http://pypi.python.org/simple testrun = http://pypi.testrun.org @@ -7,10 +7,14 @@ [testenv] deps= - :pypi:pytest + :testrun:pytest commands= py.test --junitxml={envlogdir}/junit-{envname}.xml {posargs} +[testenv:py27-pytesttrunk] +deps = + :testrun:pytest + [testenv:py-xdist] basepython=python deps={[testenv]deps} Repository URL: https://bitbucket.org/hpk42/pytest-pep8/ -- This is a commit notification from bitbucket.org. You are receiving this because you have the service enabled, addressing the recipient of this email. _______________________________________________ py-svn mailing list py-svn@codespeak.net http://codespeak.net/mailman/listinfo/py-svn