[py-svn] r41224 - py/trunk/py/code/testing
fijal at codespeak.net
fijal at codespeak.net
Sat Mar 24 10:20:27 CET 2007
Author: fijal
Date: Sat Mar 24 10:20:25 2007
New Revision: 41224
Modified:
py/trunk/py/code/testing/test_source.py
Log:
Added failing test, which I would suppose to pass
Modified: py/trunk/py/code/testing/test_source.py
==============================================================================
--- py/trunk/py/code/testing/test_source.py (original)
+++ py/trunk/py/code/testing/test_source.py Sat Mar 24 10:20:25 2007
@@ -281,3 +281,15 @@
"""
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
More information about the pytest-commit
mailing list