[py-svn] r9223 - in py/dist/py/code: . testing
hpk at codespeak.net
hpk at codespeak.net
Mon Feb 14 23:17:12 CET 2005
Author: hpk
Date: Mon Feb 14 23:17:12 2005
New Revision: 9223
Modified:
py/dist/py/code/source.py
py/dist/py/code/testing/test_source.py
Log:
fixed a bug (uninitialized locals) discovered
by translating via PyPy! added a test.
Modified: py/dist/py/code/source.py
==============================================================================
--- py/dist/py/code/source.py (original)
+++ py/dist/py/code/source.py Mon Feb 14 23:17:12 2005
@@ -56,6 +56,7 @@
""" return new source object with trailing
and leading blank lines removed.
"""
+ start, end = 0,-1
for start in range(0, len(self)):
if self.lines[start].strip():
break
Modified: py/dist/py/code/testing/test_source.py
==============================================================================
--- py/dist/py/code/testing/test_source.py (original)
+++ py/dist/py/code/testing/test_source.py Mon Feb 14 23:17:12 2005
@@ -59,6 +59,7 @@
source = Source("")
assert source == Source()
assert str(source) == ''
+ assert source.strip() == source
def test_source_strip_multiline():
source = Source()
More information about the pytest-commit
mailing list