[svn r41224] Added failing test, which I would suppose to pass

--HG--
branch : trunk
This commit is contained in:
fijal 2007-03-24 10:20:25 +01:00
parent 417d97c850
commit b8f6596760
1 changed files with 12 additions and 0 deletions

View File

@ -281,3 +281,15 @@ def test_deindent():
"""
lines = deindent(source.splitlines())
assert lines == ['', 'def f():', ' def g():', ' pass', ' ']
def test_write_read():
py.test.skip("Failing")
tmpdir = py.test.ensuretemp("source_write_read")
source = py.code.Source('''
class A(object):
def method(self):
x = 1
''')
tmpdir.ensure("a.py").write(source)
s2 = py.code.Source(tmpdir.join("a.py").pyimport().A)
assert source == s2